-
Notifications
You must be signed in to change notification settings - Fork 1.8k
#17801 Improve nullability reporting of case expressions #17813
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
Changes from 47 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
408cee1
#17801 Improve nullability reporting of case expressions
pepijnve 045fc9c
#17801 Clarify logical expression test cases
pepijnve de8b780
#17801 Attempt to clarify const evaluation logic
pepijnve bbd2949
#17801 Extend predicate const evaluation
pepijnve 2075f4b
#17801 Correctly report nullability of implicit casts in predicates
pepijnve 8c87937
#17801 Code formatting
pepijnve e155d41
Merge branch 'main' into issue_17801
alamb 5cfe8b6
Merge branch 'main' into issue_17801
alamb ac4267c
Add comment explaining why the logical plan optimizer is triggered
pepijnve 101db28
Simplify predicate eval code
pepijnve f4c8579
Code formatting
pepijnve 81b6ec1
Add license header
pepijnve b6ebd13
Merge branch 'main' into issue_17801
alamb ebc2d38
Merge branch 'refs/heads/main' into issue_17801
pepijnve 3131899
Try to align logical and physical implementations as much as possible
pepijnve 3da92e5
Allow optimizations to change fields from nullable to not-nullable
pepijnve 0a6b2e7
Correctly handle case-with-expression nullability analysis
pepijnve 113e899
Add unit tests for predicate_eval
pepijnve 9dee1e8
Another attempt to make the code easier to read
pepijnve 4a22dfc
Rework predicate_eval to use set arithmetic
pepijnve a1bc263
Rename predicate_eval to predicate_bounds
pepijnve ac765e9
Add unit tests for NullableInterval::is_certainly_...
pepijnve 51af749
Formatting
pepijnve 4af84a7
Simplify logical and physical case branch filtering logic
pepijnve 427fc30
Further simplification of `is_null`
pepijnve 0223a54
Merge remote-tracking branch 'upstream/HEAD' into issue_17801
pepijnve c5914d6
Update bitflags version declaration to match arrow-schema
pepijnve 4b879e4
Silence "needless pass by value" lint
pepijnve 5558293
WIP
pepijnve d8df5d1
Merge remote-tracking branch 'upstream/main' into issue_17801
pepijnve 867da26
Replace TernarySet with NullableInterval
pepijnve 1acb33e
Move GuaranteeRewriter to `expr`
pepijnve fabe190
Make GuaranteeRewriter implementation private
pepijnve 4f95e6d
Rewrite 'when' expressions with 'null' guarantee before evaluating bo…
pepijnve 97ffdff
Add additional test cases
pepijnve 0bfd2b2
Make null replacement the fallback branch of f_up
pepijnve 981c0f7
Remove unused dependency
pepijnve 94f7f00
Add additional explanation why nullability change is allowed.
pepijnve 262734a
Allow ScalarValue::Null to be combined with non-null scalars in Inter…
pepijnve 398cdb5
Revert adding initial expression functions for between and like; not …
pepijnve 7e4bf89
Restructure GuaranteeRewriter for readability
pepijnve 63de91a
Do not error out when rewriting 'between' expressions with empty valu…
pepijnve 44221c4
Merge remote-tracking branch 'upstream/main' into issue_17801
pepijnve 5115952
Revert changes in Interval::try_new
pepijnve 4b15030
Mimic wikipedia 3VL truth tables as well as possible in ascii art
pepijnve 5d9fc7e
Revert "Disable failing benchmark query (#17809)"
alamb ff9a41f
Merge remote-tracking branch 'apache/main' into issue_17801
alamb 3e0fd7e
Update comments
pepijnve File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change relaxes the schema check slightly. It now allows individual fields to change from nullable to not-nullable which is ok because it only allow a strict subset of the original schema.
schema_checkhas documentation stating that you should disable the schema check entirely if you want to do this. Seemed better to not have to disable checking entirely.