Repository navigation
WIP Support NULL literals in Binary expressions, add some missing LargeStringArray implementations - #1181
Closed
alamb wants to merge 3 commits into
Closed
WIP Support NULL literals in Binary expressions, add some missing LargeStringArray implementations#1181alamb wants to merge 3 commits into
alamb wants to merge 3 commits into
Conversation
alamb
commented
Oct 27, 2021
| } | ||
| } | ||
|
|
||
| /// if value represents a null literal (`ScalarValue::*(None)`) return |
Contributor
Author
There was a problem hiding this comment.
Technically a Null literal can be cast to any other type. It would be cool to properly supportDataType::Null throughout DataFusion (I spent a while trying to do this, but found many places that are not prepared to handle it -- like arrow cast kernel)
alamb
commented
Oct 27, 2021
| } | ||
|
|
||
| #[test] | ||
| fn test_compare_to_null_literal() { |
Contributor
Author
There was a problem hiding this comment.
This test found lots of good stuff -- I would say it is the best part of this PR at the moment
Member
|
related #1257 |
Contributor
Author
|
Closing as I haven't had a chance to work on it for a while |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOT YET WORKING / READY FOR REVIEW
I thought this was ready but when adding new tests it is not. Thus leaving it as a draft, but still needs more work
Which issue does this PR close?
Fixes #1179
Rationale for this change
Binary operations to literal NULL don't work in DataFusion. While seemingly a corner case, we sometimes generate such predicates during rewrites in IOx making supporting such expressions important.
What changes are included in this PR?
ScalarValuesNote this is far from a comprehensive solution -- it is a localized fix for binary expression evaluation. The more comprehsive fix is discussed by @Dandandan and @jimexist on #1179 -- see #1179 (comment)
However, I think this PR should be merged because:
Are there any user-facing changes?
Fewer errors, no breaking changes
Follow on work