This is an automated email from the ASF dual-hosted git repository. englefly pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 28dce9f226c [opt](nereids) let DBA ignore some runtime filters (#25933) 28dce9f226c is described below commit 28dce9f226c067829267f5217c83efd9f9c5b608 Author: minghong <engle...@gmail.com> AuthorDate: Sun Oct 29 21:39:25 2023 +0800 [opt](nereids) let DBA ignore some runtime filters (#25933) example: set ignore_runtime_filter_ids="3, 1"; after this setting, RF003 and RF001 will be ignored --- .../glue/translator/RuntimeFilterTranslator.java | 6 ++++++ .../java/org/apache/doris/qe/SessionVariable.java | 23 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/RuntimeFilterTranslator.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/RuntimeFilterTranslator.java index 8ffd307e328..69c19634c0e 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/RuntimeFilterTranslator.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/RuntimeFilterTranslator.java @@ -38,6 +38,7 @@ import org.apache.doris.planner.HashJoinNode.DistributionMode; import org.apache.doris.planner.JoinNodeBase; import org.apache.doris.planner.RuntimeFilter.RuntimeFilterTarget; import org.apache.doris.planner.ScanNode; +import org.apache.doris.qe.ConnectContext; import org.apache.doris.qe.SessionVariable; import org.apache.doris.statistics.StatisticalType; import org.apache.doris.thrift.TRuntimeFilterType; @@ -111,6 +112,11 @@ public class RuntimeFilterTranslator { * @param ctx plan translator context */ public void createLegacyRuntimeFilter(RuntimeFilter filter, JoinNodeBase node, PlanTranslatorContext ctx) { + if (ConnectContext.get() != null + && ConnectContext.get().getSessionVariable() + .getIgnoredRuntimeFilterIds().contains(filter.getId().asInt())) { + return; + } Expr src = ExpressionTranslator.translate(filter.getSrcExpr(), ctx); List<Expr> targetExprList = new ArrayList<>(); List<Map<TupleId, List<SlotId>>> targetTupleIdMapList = new ArrayList<>(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java index e0872b2046c..a454cd8e568 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java @@ -1252,6 +1252,29 @@ public class SessionVariable implements Serializable, Writable { description = {"是否启用更快的浮点数转换算法,注意会影响输出格式", "Set true to enable faster float pointer number convert"}) public boolean fasterFloatConvert = false; + @VariableMgr.VarAttr(name = IGNORE_RUNTIME_FILTER_IDS, + description = {"the runtime filter id in IGNORE_RUNTIME_FILTER_IDS list will not be generated"}) + + public String ignoreRuntimeFilterIds = ""; + public static final String IGNORE_RUNTIME_FILTER_IDS = "ignore_runtime_filter_ids"; + + public Set<Integer> getIgnoredRuntimeFilterIds() { + return Arrays.stream(ignoreRuntimeFilterIds.split(",[\\s]*")) + .map(v -> { + int res = -1; + try { + res = Integer.valueOf(v); + } catch (Exception e) { + //ignore it + } + return res; + }).collect(ImmutableSet.toImmutableSet()); + } + + public void setIgnoreRuntimeFilterIds(String ignoreRuntimeFilterIds) { + this.ignoreRuntimeFilterIds = ignoreRuntimeFilterIds; + } + public static final String IGNORE_SHAPE_NODE = "ignore_shape_nodes"; public Set<String> getIgnoreShapePlanNodes() { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org