Skip to content

Commit

Permalink
[fix](analytic) Fix data distribution after analytic operator (#41902)
Browse files Browse the repository at this point in the history
Fix data distribution after analytic operator
  • Loading branch information
Gabriel39 authored Oct 16, 2024
1 parent 39f4883 commit 55cf348
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions be/src/pipeline/exec/analytic_sink_operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,16 @@ class AnalyticSinkOperatorX final : public DataSinkOperatorX<AnalyticSinkLocalSt
DataDistribution required_data_distribution() const override {
if (_partition_by_eq_expr_ctxs.empty()) {
return {ExchangeType::PASSTHROUGH};
} else if (_order_by_eq_expr_ctxs.empty()) {
} else {
return _is_colocate && _require_bucket_distribution && !_followed_by_shuffled_operator
? DataDistribution(ExchangeType::BUCKET_HASH_SHUFFLE, _partition_exprs)
: DataDistribution(ExchangeType::HASH_SHUFFLE, _partition_exprs);
}
return DataSinkOperatorX<AnalyticSinkLocalState>::required_data_distribution();
}

bool require_data_distribution() const override { return true; }
bool require_shuffled_data_distribution() const override {
return !_partition_by_eq_expr_ctxs.empty() && _order_by_eq_expr_ctxs.empty();
return !_partition_by_eq_expr_ctxs.empty();
}

private:
Expand Down

0 comments on commit 55cf348

Please sign in to comment.