Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed Jun 19, 2024
1 parent 790aff1 commit 488bf79
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.doris.qe;

import org.apache.doris.analysis.SetVar;
import org.apache.doris.analysis.StatementBase;
import org.apache.doris.analysis.StringLiteral;
import org.apache.doris.catalog.Env;
import org.apache.doris.common.Config;
Expand All @@ -26,6 +27,7 @@
import org.apache.doris.common.io.Text;
import org.apache.doris.common.io.Writable;
import org.apache.doris.common.util.TimeUtils;
import org.apache.doris.nereids.StatementContext;
import org.apache.doris.nereids.analyzer.UnboundResultSink;
import org.apache.doris.nereids.glue.LogicalPlanAdapter;
import org.apache.doris.nereids.metrics.Event;
Expand Down Expand Up @@ -3060,12 +3062,15 @@ public static boolean canUseNereidsDistributePlanner() {
if (!connectContext.getState().isNereids()) {
return false;
}
LogicalPlanAdapter planAdapter =
(LogicalPlanAdapter) connectContext.getStatementContext().getParsedStatement();
if (planAdapter == null) {
StatementContext statementContext = connectContext.getStatementContext();
if (statementContext == null) {
return false;
}
LogicalPlan logicalPlan = planAdapter.getLogicalPlan();
StatementBase parsedStatement = statementContext.getParsedStatement();
if (!(parsedStatement instanceof LogicalPlanAdapter)) {
return false;
}
LogicalPlan logicalPlan = ((LogicalPlanAdapter) parsedStatement).getLogicalPlan();
SessionVariable sessionVariable = connectContext.getSessionVariable();
if (logicalPlan instanceof UnboundResultSink
&& sessionVariable.enableNereidsDistributePlanner && sessionVariable.enablePipelineXEngine) {
Expand Down

0 comments on commit 488bf79

Please sign in to comment.