Skip to content

[GLUTEN-8227][VL] fix: Update sort elimination rules for Hash Aggregate#9473

Merged
zhztheplayer merged 6 commits intoapache:mainfrom
acvictor:acvictor/sortRules
Mar 21, 2026
Merged

[GLUTEN-8227][VL] fix: Update sort elimination rules for Hash Aggregate#9473
zhztheplayer merged 6 commits intoapache:mainfrom
acvictor:acvictor/sortRules

Conversation

@acvictor
Copy link
Copy Markdown
Contributor

@acvictor acvictor commented Apr 30, 2025

What changes were proposed in this pull request?

Update sort elimination rules for hash aggregate only when the base aggregate was a sort aggregate. Only if a sort aggregate is transformed into a hash aggregate, can we safely assume that the aggregation does not depend on input order

(Part of fix for: #8227)

How was this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)

@github-actions github-actions bot added CORE works for Gluten Core VELOX CLICKHOUSE labels Apr 30, 2025
@github-actions
Copy link
Copy Markdown

Thanks for opening a pull request!

Could you open an issue for this pull request on Github Issues?

https://github.com/apache/incubator-gluten/issues

Then could you also rename commit message and pull request title in the following format?

[GLUTEN-${ISSUES_ID}][COMPONENT]feat/fix: ${detailed message}

See also:

@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

8 similar comments
@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

github-actions bot commented May 1, 2025

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

github-actions bot commented May 1, 2025

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

github-actions bot commented May 1, 2025

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

github-actions bot commented May 1, 2025

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

github-actions bot commented May 2, 2025

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

github-actions bot commented May 2, 2025

Run Gluten Clickhouse CI on x86

@acvictor acvictor changed the title Update rules [GLUTEN-8227][VL] fix: Update sort elimination rules for Hash Aggregate May 2, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented May 2, 2025

#8227

@acvictor acvictor marked this pull request as ready for review May 5, 2025 09:17
@acvictor
Copy link
Copy Markdown
Contributor Author

acvictor commented May 5, 2025

@zhztheplayer @NEUpanning can you please help review this PR?

@acvictor
Copy link
Copy Markdown
Contributor Author

acvictor commented May 8, 2025

@ulysses-you can you please take a look at this PR?

@zhztheplayer
Copy link
Copy Markdown
Member

Compared to having this flag, can we just add a new operator for offloaded sort aggregation?

@acvictor
Copy link
Copy Markdown
Contributor Author

acvictor commented May 9, 2025

Compared to having this flag, can we just add a new operator for offloaded sort aggregation?

Thanks for the suggestion. I will try it out.

@acvictor acvictor closed this May 12, 2025
@acvictor acvictor force-pushed the acvictor/sortRules branch from 60698f9 to 9a71c14 Compare May 12, 2025 04:16
@acvictor acvictor reopened this May 12, 2025
@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

5 similar comments
@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions github-actions bot added the stale stale label Jan 30, 2026
@FelixYBW FelixYBW removed the stale stale label Jan 30, 2026
@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

1 similar comment
@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 3, 2026

Run Gluten Clickhouse CI on x86

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 3, 2026

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 3, 2026

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 3, 2026

Run Gluten Clickhouse CI on x86

@acvictor acvictor requested a review from rui-mo March 6, 2026 05:10
@acvictor
Copy link
Copy Markdown
Contributor Author

@zhztheplayer @rui-mo can you please review this again? The main change was in response to the comment "how about directly adding SortAggregateExecTransformer? Then we can decide whether to remove the sort based on the operator class."

@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

Copy link
Copy Markdown
Member

@zhztheplayer zhztheplayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good now. Sorry for the delay.

@zhztheplayer zhztheplayer merged commit d1b5e1c into apache:main Mar 21, 2026
59 checks passed
zzcclp added a commit to zzcclp/gluten that referenced this pull request Apr 7, 2026
…eordered' suite

After apache#9473 , there is an issue when executing suite 'Eliminate two aggregate joins with attribute reordered'.
zzcclp added a commit that referenced this pull request Apr 7, 2026
…eordered' suite (#11884)

After #9473 , there is an issue when executing suite 'Eliminate two aggregate joins with attribute reordered'.
malinjawi pushed a commit to malinjawi/incubator-gluten that referenced this pull request Apr 9, 2026
…eordered' suite (apache#11884)

After apache#9473 , there is an issue when executing suite 'Eliminate two aggregate joins with attribute reordered'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants