Skip to content

Commit 6e937ad

Browse files
committed
adjust some local shuffle rules
1 parent afc9ac1 commit 6e937ad

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

be/src/pipeline/exec/distinct_streaming_aggregation_operator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class DistinctStreamingAggOperatorX final
118118
? DataDistribution(ExchangeType::BUCKET_HASH_SHUFFLE, _partition_exprs)
119119
: DataDistribution(ExchangeType::HASH_SHUFFLE, _partition_exprs);
120120
}
121-
return StatefulOperatorX<DistinctStreamingAggLocalState>::required_data_distribution(state);
121+
return {ExchangeType::PASSTHROUGH};
122122
}
123123

124124
bool require_data_distribution() const override { return _is_colocate; }

be/src/pipeline/exec/hashjoin_probe_operator.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,16 @@ class HashJoinProbeOperatorX MOCK_REMOVE(final)
133133
DataDistribution required_data_distribution(RuntimeState* /*state*/) const override {
134134
if (_join_op == TJoinOp::NULL_AWARE_LEFT_ANTI_JOIN) {
135135
return {ExchangeType::NOOP};
136+
} else if (_is_broadcast_join) {
137+
return _child && _child->is_serial_operator()
138+
? DataDistribution(ExchangeType::PASSTHROUGH)
139+
: DataDistribution(ExchangeType::NOOP);
136140
}
137-
return _is_broadcast_join
138-
? DataDistribution(ExchangeType::PASSTHROUGH)
139-
: (_join_distribution == TJoinDistributionType::BUCKET_SHUFFLE ||
140-
_join_distribution == TJoinDistributionType::COLOCATE
141-
? DataDistribution(ExchangeType::BUCKET_HASH_SHUFFLE,
142-
_partition_exprs)
143-
: DataDistribution(ExchangeType::HASH_SHUFFLE, _partition_exprs));
141+
142+
return (_join_distribution == TJoinDistributionType::BUCKET_SHUFFLE ||
143+
_join_distribution == TJoinDistributionType::COLOCATE
144+
? DataDistribution(ExchangeType::BUCKET_HASH_SHUFFLE, _partition_exprs)
145+
: DataDistribution(ExchangeType::HASH_SHUFFLE, _partition_exprs));
144146
}
145147
bool is_broadcast_join() const { return _is_broadcast_join; }
146148

0 commit comments

Comments
 (0)