Skip to content

[SPARK-51901] [SQL] Disallow generator functions in grouping sets #50698

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

Closed

Conversation

mihailoale-db
Copy link
Contributor

@mihailoale-db mihailoale-db commented Apr 24, 2025

What changes were proposed in this pull request?

Currently following query throws an internal error:

select 1 group by grouping sets (inline(array(struct('col'))))

I propose that we disallow generator functions in grouping sets and as a consequence throw a more user friendly one.

Why are the changes needed?

To improve error message.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Added tests.

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the SQL label Apr 24, 2025
@mihailoale-db mihailoale-db force-pushed the generatorgroupingsets branch from 110eea8 to d561877 Compare April 27, 2025 12:08
@mihailoale-db
Copy link
Contributor Author

@cloud-fan PTAL when you have time. Thanks!

@mihailoale-db mihailoale-db force-pushed the generatorgroupingsets branch from d561877 to d262b29 Compare April 28, 2025 07:55
@mihailoale-db
Copy link
Contributor Author

@cloud-fan passed all the tests!

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in 99270b2 Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants