Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,14 @@ public static Optional<String> disableJoinReorderIfStatsInvalid(List<CatalogRela
double rowCount = calculator.getTableRowCount(scan);
// row count not available
if (rowCount == -1) {
LOG.info("disable join reorder since row count not available: "
+ scan.getTable().getNameWithFullQualifiers());
try {
ConnectContext.get().getSessionVariable()
.setVarOnce(SessionVariable.DISABLE_JOIN_REORDER, "true");
LOG.info("disable join reorder since row count not available: "
+ scan.getTable().getNameWithFullQualifiers());
} catch (Exception e) {
LOG.info("disableNereidsJoinReorderOnce failed");
}
return Optional.of("table[" + scan.getTable().getName() + "] row count is invalid");
}
if (scan instanceof OlapScan) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ suite("mv_ssb_test") {
sql "set runtime_filter_mode=OFF"
sql "SET enable_nereids_timeout = false"
sql "SET BATCH_SIZE = 4064"

sql """
alter table customer modify column c_mktsegment SET STATS ('ndv'='5', 'num_nulls'='0', 'row_count'='3000');
alter table lineorder modify column lo_revenue SET STATS ('ndv'='453898', 'num_nulls'='0', 'row_count'='30600572');
alter table part modify column p_mfgr SET STATS ('ndv'='5', 'num_nulls'='0', 'row_count'='20000.0');
alter table date modify column d_dayofweek SET STATS ('ndv'='7', 'num_nulls'='0', 'row_count'='255');
alter table supplier modify column s_phone SET STATS ('ndv'='200', 'num_nulls'='0', 'row_count'='200');
"""
def mv1_1 = """
SELECT SUM(lo_extendedprice*lo_discount) AS
REVENUE
Expand Down
Loading