-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[fix](pipeline) Add streaming aggregation local exchange switch #66222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -174,6 +174,8 @@ public class SessionVariable implements Serializable, Writable { | |
| "enable_distinct_streaming_agg_force_passthrough"; | ||
| public static final String ENABLE_BROADCAST_JOIN_FORCE_PASSTHROUGH = "enable_broadcast_join_force_passthrough"; | ||
| public static final String ENABLE_LOCAL_EXCHANGE_BEFORE_AGG = "enable_local_exchange_before_agg"; | ||
| public static final String ENABLE_LOCAL_EXCHANGE_BEFORE_STREAMING_AGG = | ||
| "enable_local_exchange_before_streaming_agg"; | ||
| public static final String DISABLE_COLOCATE_PLAN = "disable_colocate_plan"; | ||
| public static final String COLOCATE_MAX_PARALLEL_NUM = "colocate_max_parallel_num"; | ||
| public static final String ENABLE_BUCKET_SHUFFLE_JOIN = "enable_bucket_shuffle_join"; | ||
|
|
@@ -1408,6 +1410,9 @@ public void checkQuerySlotCount(String slotCnt) { | |
| @VarAttrDef.VarAttr(name = ENABLE_LOCAL_EXCHANGE_BEFORE_AGG, fuzzy = true) | ||
| public boolean enableLocalExchangeBeforeAgg = true; | ||
|
|
||
| @VarAttrDef.VarAttr(name = ENABLE_LOCAL_EXCHANGE_BEFORE_STREAMING_AGG, fuzzy = true) | ||
| public boolean enableLocalExchangeBeforeStreamingAgg = false; | ||
|
|
||
| @VarAttrDef.VarAttr(name = ENABLE_DISTINCT_STREAMING_AGG_FORCE_PASSTHROUGH, fuzzy = true) | ||
| public boolean enableDistinctStreamingAggForcePassthrough = true; | ||
|
|
||
|
|
@@ -3903,6 +3908,7 @@ public void initFuzzyModeVariables() { | |
| this.disableStreamPreaggregations = random.nextBoolean(); | ||
| this.enableStreamingAggHashJoinForcePassthrough = random.nextBoolean(); | ||
| this.enableLocalExchangeBeforeAgg = random.nextBoolean(); | ||
| this.enableLocalExchangeBeforeStreamingAgg = random.nextBoolean(); | ||
| this.enableDistinctStreamingAggForcePassthrough = random.nextBoolean(); | ||
| this.enableBroadcastJoinForcePassthrough = random.nextBoolean(); | ||
| this.enableShareHashTableForBroadcastJoin = random.nextBoolean(); | ||
|
|
@@ -5719,6 +5725,7 @@ public TQueryOptions toThrift() { | |
| tResult.setEnableDistinctStreamingAggregation(enableDistinctStreamingAggregation); | ||
| tResult.setEnableStreamingAggHashJoinForcePassthrough(enableStreamingAggHashJoinForcePassthrough); | ||
| tResult.setEnableLocalExchangeBeforeAgg(enableLocalExchangeBeforeAgg); | ||
| tResult.setEnableLocalExchangeBeforeStreamingAgg(enableLocalExchangeBeforeStreamingAgg); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P1] Make the FE planner honor this dedicated switch With |
||
| tResult.setEnableDistinctStreamingAggForcePassthrough(enableDistinctStreamingAggForcePassthrough); | ||
| tResult.setEnableBroadcastJoinForcePassthrough(enableBroadcastJoinForcePassthrough); | ||
| tResult.setPartitionTopnMaxPartitions(partitionTopNMaxPartitions); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Forward this query-affecting variable to the master
getForwardVariables()only includes fields markedneedForwardor one of the query-result-affect flags, and observer queries sent byFEOpExecutorare planned under a fresh master context. Because this annotation sets none of them,SET enable_local_exchange_before_streaming_agg=trueon a follower is omitted and the master keeps false, so the knob silently changes behavior depending on the connected FE. Please addneedForward=trueand cover follower-to-master restoration.