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

Added check for aggregate functions in optimizer rules #12860

Merged
merged 3 commits into from
Oct 12, 2024

Conversation

jonathanc-n
Copy link
Contributor

Which issue does this PR close?

Closes #12814 .

Rationale for this change

What changes are included in this PR?

The query is invalid due to aggregation functions in where clause.

Are these changes tested?

Added check for aggregation functions.

Are there any user-facing changes?

@github-actions github-actions bot added sql SQL Planner sqllogictest SQL Logic Tests (.slt) labels Oct 10, 2024
@jonathanc-n
Copy link
Contributor Author

@jonahgao thank you for the review!

Copy link
Member

@jonahgao jonahgao left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @jonathanc-n

@jonathanc-n
Copy link
Contributor Author

Alright should be good to go @findepi @jonahgao

@jonahgao jonahgao merged commit 6267ede into apache:main Oct 12, 2024
24 checks passed
@jonahgao
Copy link
Member

Thanks @jonathanc-n @findepi

hailelagi pushed a commit to hailelagi/datafusion that referenced this pull request Oct 14, 2024
* fix panic

* Update datafusion/sql/src/select.rs

Co-authored-by: Jonah Gao <[email protected]>

* move issue

---------

Co-authored-by: Jonah Gao <[email protected]>
@jonathanc-n jonathanc-n deleted the panic-in-simplify_expressions branch November 17, 2024 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sql SQL Planner sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic in simplify_expressions optimizer rules when running an aggregate query (SQLancer)
3 participants