Skip to content
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

[BugFix] One-staged spillable aggregation's having predicates should not applied to pre-cache aggregate operator #54257

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ StatusOr<ChunkPtr> SpillableAggregateBlockingSourceOperator::pull_chunk(RuntimeS

if (res != nullptr) {
const int64_t old_size = res->num_rows();
RETURN_IF_ERROR(eval_conjuncts_and_in_filters(_stream_aggregator->conjunct_ctxs(), res.get()));
// For having
// if current SpillableAggregateBlockSourceOperator is a pre-cache operator, the output format of aggregation columns
// is binary column(for an example: multi_count_distinct) generated by AggregationFunction::serialize_column,
// so having predicates should not be applied to the partial and incomplete result.
if (!_aggregator->is_pre_cache()) {
RETURN_IF_ERROR(eval_conjuncts_and_in_filters(_stream_aggregator->conjunct_ctxs(), res.get()));
}
_stream_aggregator->update_num_rows_returned(-(old_size - static_cast<int64_t>(res->num_rows())));
}

Expand Down
Loading