Skip to content

Move handlign of NULL literals in where clause to type coercion pass #11491

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

Merged
merged 7 commits into from
Jul 18, 2024

Conversation

xinlifoobar
Copy link
Contributor

Which issue does this PR close?

Follow up #11266. This is to use type_coercion for null literary to avoid hard coding in physical planner.

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added logical-expr Logical plan and expressions optimizer Optimizer rules sqllogictest SQL Logic Tests (.slt) labels Jul 16, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you for the follow up @xinlifoobar -- I think this works and is reasonable, though it is quite special case.

I left a suggestion on how to make this more general purpose, let me know what you think.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thanks -- sorry for the back and forth @xinlifoobar - I think we could make this simpler, But if you are sick of changing things, that is fine too and I can make a follow on PR

@xinlifoobar xinlifoobar force-pushed the dev/xinli/null_lit_follow branch from 5809d74 to e81fe1d Compare July 18, 2024 01:55
@github-actions github-actions bot removed the logical-expr Logical plan and expressions label Jul 18, 2024
@github-actions github-actions bot removed the sqllogictest SQL Logic Tests (.slt) label Jul 18, 2024
@xinlifoobar
Copy link
Contributor Author

Thanks -- sorry for the back and forth @xinlifoobar - I think we could make this simpler, But if you are sick of changing things, that is fine too and I can make a follow on PR

Ya, I am ok with this :) Sometimes I may make bad changes due to a lack of knowledge of the whole repo. You guidance is always helpful here.

@alamb
Copy link
Contributor

alamb commented Jul 18, 2024

Ya, I am ok with this :) Sometimes I may make bad changes due to a lack of knowledge of the whole repo. You guidance is always helpful here.

Thank you for understanding -- I feel bad when a PR is outstanding for a while due to lack of feedback or when we have to do multiple rounds of feedback when they each take a day.

Also, thank you for all the help so far 🙏

@alamb alamb changed the title Followup Support NULL literals in where clause Move handlign of NULL literals in where clause to type coercion pass Jul 18, 2024
@alamb alamb merged commit d91a03f into apache:main Jul 18, 2024
23 checks passed
if let LogicalPlan::Filter(filter) = &mut plan {
if let Ok(new_predicate) = filter
.predicate
.clone()
Copy link
Contributor

Choose a reason for hiding this comment

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

I found a way to avoid this clone: #11530

Lordworms pushed a commit to Lordworms/arrow-datafusion that referenced this pull request Jul 23, 2024
…pache#11491)

* Revert "Support `NULL` literals in where clause  (apache#11266)"

This reverts commit fa01917.

* Followup Support NULL literals in where clause

* misc err change

* adopt comparison_coercion

* Fix comments

* Fix comments
wiedld pushed a commit to influxdata/arrow-datafusion that referenced this pull request Jul 31, 2024
…pache#11491)

* Revert "Support `NULL` literals in where clause  (apache#11266)"

This reverts commit fa01917.

* Followup Support NULL literals in where clause

* misc err change

* adopt comparison_coercion

* Fix comments

* Fix comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimizer Optimizer rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants