branch-4.1: [fix](preagg) Enable pre-aggregation for multi-argument aggregate functions with all-key distinct inputs #65846 - #66676
Open
github-actions[bot] wants to merge 1 commit into
Conversation
…ctions with all-key distinct inputs (#65846) ### What problem does this PR solve? Issue Number: close #xxx Related PR: #48502 Problem Summary: When an aggregate function has more than one child expression (e.g., [count(distinct k6, v7)](vscode-file://vscode-app/usr/share/code/resources/app/out/vs/code/electron-browser/workbench/workbench.html)), the pre-aggregation status check previously only handled the cases of zero children or exactly one child. Multi-child aggregate functions fell through to the else branch that attempted to process them via [checkAggWithKeyAndValueSlots](vscode-file://vscode-app/usr/share/code/resources/app/out/vs/code/electron-browser/workbench/workbench.html), which is designed for single aggregate functions with complex expressions like IF/CASE WHEN — not for genuinely multi-parameter aggregate functions. This could lead to incorrect pre-aggregation decisions for functions like COUNT(DISTINCT col1, col2). This fix explicitly only enable pre-aggregation for multi-argument aggregate functions with all-key distinct inputs, and reject other multi-argument aggregate functions. None
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
|
run buildall |
Contributor
FE UT Coverage ReportIncrement line coverage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-picked from #65846