Skip to content

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

Merged
alamb merged 7 commits into
apache:mainfrom
xinlifoobar:dev/xinli/null_lit_follow
Jul 18, 2024
Merged

alamb merged 7 commits into
apache:mainfrom
xinlifoobar:dev/xinli/null_lit_follow

Conversation

@xinlifoobar

Copy link
Copy Markdown
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

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

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.

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

alamb commented Jul 18, 2024

Copy link
Copy Markdown
Contributor

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
if let LogicalPlan::Filter(filter) = &mut plan {
if let Ok(new_predicate) = filter
.predicate
.clone()

Copy link
Copy Markdown
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