Skip to content

Commit

Permalink
fix checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
LiBinfeng-01 committed Oct 24, 2024
1 parent 98a9a45 commit d28d6c5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,23 @@ public void setVarOnceInSql(StatementContext context) {
if (value.isPresent()) {
try {
VariableMgr.setVar(sessionVariable, new SetVar(key, new StringLiteral(value.get())));
context.invalidCache(key);
} catch (Throwable t) {
throw new AnalysisException("Can not set session variable '"
+ key + "' = '" + value.get() + "'", t);
}
}
}
// if sv set enable_nereids_planner=true and hint set enable_nereids_planner=false, we should set
// enable_fallback_to_original_planner=true and revert it after executing.
// throw exception to fall back to original planner
if (!sessionVariable.isEnableNereidsPlanner()) {
try {
sessionVariable.enableFallbackToOriginalPlannerOnce();
} catch (Throwable t) {
throw new AnalysisException("failed to set fallback to original planner to true", t);
}
throw new AnalysisException("The nereids is disabled in this sql, fallback to original planner");
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;

/**
* eliminate logical select hint and set them to cascade context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.apache.doris.common.FeConstants;
import org.apache.doris.common.PatternMatcher;
import org.apache.doris.common.PatternMatcherWrapper;
import org.apache.doris.common.VariableAnnotation;
import org.apache.doris.common.util.ProfileManager;
import org.apache.doris.common.util.RuntimeProfile;
import org.apache.doris.load.ExportJob;
Expand Down

0 comments on commit d28d6c5

Please sign in to comment.