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

[GLUTEN-7096] [CH] fix exception when same names in group by #7101

Merged
merged 4 commits into from
Sep 24, 2024

Conversation

shuai-xu
Copy link
Contributor

@shuai-xu shuai-xu commented Sep 3, 2024

What changes were proposed in this pull request?

This pr fix two problems, one is that when group by has same names, the duplicated names will be remove by distinct in genHashAggregateExecTransformer, and cause Missmatch result columns size exception. The other is that when group by has same names but with different qualifier due to alias table name, the same names are passed to clickhouse, and cause Mismatch output schema exception.
The solution is that we distinct the groupings in Agg by ignoring qualifier, and insert a Project if has same names.

(Fixes: #7096)

How was this patch tested?

This patch was tested by unit tests.

@github-actions github-actions bot added CORE works for Gluten Core CLICKHOUSE labels Sep 3, 2024
Copy link

github-actions bot commented Sep 3, 2024

#7096

Copy link

github-actions bot commented Sep 3, 2024

Run Gluten Clickhouse CI

3 similar comments
Copy link

github-actions bot commented Sep 4, 2024

Run Gluten Clickhouse CI

Copy link

github-actions bot commented Sep 4, 2024

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

zzcclp
zzcclp previously approved these changes Sep 24, 2024
Copy link
Contributor

@zzcclp zzcclp left a comment

Choose a reason for hiding this comment

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

LGTM

@zzcclp
Copy link
Contributor

zzcclp commented Sep 24, 2024

please fix conflicts first

Copy link

Run Gluten Clickhouse CI

@zzcclp zzcclp merged commit c8cfe11 into apache:main Sep 24, 2024
44 checks passed
baibaichen added a commit to baibaichen/gluten that referenced this pull request Sep 26, 2024
baibaichen added a commit that referenced this pull request Sep 26, 2024
* Revert "[GLUTEN-7096] [CH] fix exception when same names in group by (#7101)"

This reverts commit c8cfe11.

* Add UT for 'GLUTEN-7367: Memory limit exceeded'

* fix style
sharkdtu pushed a commit to sharkdtu/gluten that referenced this pull request Nov 11, 2024
…7101)

* [GLUTEN-7096] [CH] fix exception when same names in group by

* move case to hive

* fix test failure

* fix test failure
sharkdtu pushed a commit to sharkdtu/gluten that referenced this pull request Nov 11, 2024
* Revert "[GLUTEN-7096] [CH] fix exception when same names in group by (apache#7101)"

This reverts commit c8cfe11.

* Add UT for 'GLUTEN-7367: Memory limit exceeded'

* fix style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLICKHOUSE CORE works for Gluten Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CH] throw exception when agg grouping has same attributes
2 participants