Skip to content

Commit

Permalink
add sv enable_runtime_filter_partition_prune
Browse files Browse the repository at this point in the history
  • Loading branch information
suxiaogang223 committed Feb 8, 2025
1 parent 2cdc9e8 commit 71eb85c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -4017,6 +4032,7 @@ public TQueryOptions toThrift() {
tResult.setIgnoreRuntimeFilterError(ignoreRuntimeFilterError);
tResult.setEnableFixedLenToUint32V2(enableFixedLenToUint32V2);
tResult.setProfileLevel(getProfileLevel());
tResult.setEnableRuntimeFilterPartitionPrune(enableRuntimeFilterPartitionPrune);

return tResult;
}
Expand Down
2 changes: 2 additions & 0 deletions gensrc/thrift/PaloInternalService.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 71eb85c

Please sign in to comment.