From 71eb85cd670676efb3aa25cfc5ba0e90d6d787af Mon Sep 17 00:00:00 2001 From: Socrates Date: Sat, 8 Feb 2025 14:36:48 +0800 Subject: [PATCH] add sv enable_runtime_filter_partition_prune --- .../org/apache/doris/qe/SessionVariable.java | 16 ++++++++++++++++ gensrc/thrift/PaloInternalService.thrift | 2 ++ 2 files changed, 18 insertions(+) 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 ba4fa429dd9e672..f9844ce9cdabada 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 @@ -361,6 +361,9 @@ public class SessionVariable implements Serializable, Writable { public static final String ENABLE_RUNTIME_FILTER_PRUNE = "enable_runtime_filter_prune"; + + public static final String ENABLE_RUNTIME_FILTER_PARTITION_PRUNE = + "enable_runtime_filter_partition_prune"; static final String SESSION_CONTEXT = "session_context"; @@ -1492,6 +1495,9 @@ public void setEnableLeftZigZag(boolean enableLeftZigZag) { @VariableMgr.VarAttr(name = ENABLE_RUNTIME_FILTER_PRUNE, needForward = true, fuzzy = true) public boolean enableRuntimeFilterPrune = true; + @VariableMgr.VarAttr(name = ENABLE_RUNTIME_FILTER_PARTITION_PRUNE, needForward = true, fuzzy = true) + public boolean enableRuntimeFilterPartitionPrune = true; + /** * The client can pass some special information by setting this session variable in the format: "k1:v1;k2:v2". * For example, trace_id can be passed to trace the query request sent by the user. @@ -2503,6 +2509,7 @@ public void initFuzzyModeVariables() { this.runtimeFilterType = 1 << randomInt; this.enableParallelScan = random.nextInt(2) == 0; this.enableRuntimeFilterPrune = (randomInt % 10) == 0; + this.enableRuntimeFilterPartitionPrune = (randomInt % 2) == 0; switch (randomInt) { case 0: @@ -3676,6 +3683,14 @@ public void setEnableRuntimeFilterPrune(boolean enableRuntimeFilterPrune) { this.enableRuntimeFilterPrune = enableRuntimeFilterPrune; } + public boolean isEnableRuntimeFilterPartitionPrune() { + return enableRuntimeFilterPartitionPrune; + } + + public void setEnableRuntimeFilterPartitionPrune(boolean enableRuntimeFilterPartitionPrune) { + this.enableRuntimeFilterPartitionPrune = enableRuntimeFilterPartitionPrune; + } + public void setFragmentTransmissionCompressionCodec(String codec) { this.fragmentTransmissionCompressionCodec = codec; } @@ -4017,6 +4032,7 @@ public TQueryOptions toThrift() { tResult.setIgnoreRuntimeFilterError(ignoreRuntimeFilterError); tResult.setEnableFixedLenToUint32V2(enableFixedLenToUint32V2); tResult.setProfileLevel(getProfileLevel()); + tResult.setEnableRuntimeFilterPartitionPrune(enableRuntimeFilterPartitionPrune); return tResult; } diff --git a/gensrc/thrift/PaloInternalService.thrift b/gensrc/thrift/PaloInternalService.thrift index 2e8ed9c36879013..bd848fbe6d9aa20 100644 --- a/gensrc/thrift/PaloInternalService.thrift +++ b/gensrc/thrift/PaloInternalService.thrift @@ -366,6 +366,8 @@ struct TQueryOptions { 147: optional i32 profile_level = 1; + 148: optional bool enable_runtime_filter_partition_prune = true; + // For cloud, to control if the content would be written into file cache // In write path, to control if the content would be written into file cache. // In read path, read from file cache or remote storage when execute query.