Skip to content

Commit

Permalink
skip if ut or hint
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Sep 10, 2024
1 parent 2c9998a commit 6d2b2e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.apache.doris.analysis.StatementBase;
import org.apache.doris.catalog.Column;
import org.apache.doris.catalog.TableIf;
import org.apache.doris.common.FeConstants;
import org.apache.doris.common.FormatOptions;
import org.apache.doris.common.NereidsException;
import org.apache.doris.common.Pair;
Expand Down Expand Up @@ -257,8 +258,11 @@ private Plan planWithoutLock(
return rewrittenPlan;
}
}
List<LogicalOlapScan> scans = getAllOlapScans(cascadesContext.getRewritePlan());
StatsCalculator.disableJoinReorderIfTableRowCountNotAvailable(scans, cascadesContext);

if (!FeConstants.runningUnitTest && !cascadesContext.isLeadingDisableJoinReorder()) {
List<LogicalOlapScan> scans = getAllOlapScans(cascadesContext.getRewritePlan());
StatsCalculator.disableJoinReorderIfTableRowCountNotAvailable(scans, cascadesContext);
}

optimize();
if (statementContext.getConnectContext().getExecutor() != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public static void disableJoinReorderIfTableRowCountNotAvailable(
LOG.info("disable join reorder since row count not available: "
+ scan.getTable().getNameWithFullQualifiers());
ConnectContext.get().getSessionVariable().setDisableJoinReorder(true);
return;
}
}
}
Expand Down

0 comments on commit 6d2b2e8

Please sign in to comment.