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

Fix nullability calculation for CASE expressions #2814

Merged
merged 2 commits into from Jun 30, 2022

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jun 29, 2022

Which issue does this PR close?

Part of #2778

Rationale for this change

apache/arrow-rs#1888 (added in arrow 17.0.0) added validation to RecordBatch if the schema's declared nullability is different than its actual nullability it throws a runtime error.

What changes are included in this PR?

Correct declared schema nullability calculation for CASE expressions

There are no tests in this PR -- they are covered in #2778

Are there any user-facing changes?

Yes the output schema calculation for CASE expressions

@github-actions github-actions bot added logical-expr Logical plan and expressions physical-expr Physical Expressions labels Jun 29, 2022
@alamb alamb mentioned this pull request Jun 29, 2022
6 tasks
Copy link
Contributor

@liukun4515 liukun4515 left a comment

Choose a reason for hiding this comment

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

Maybe we should add some test cases for that in the follow up pr

@liukun4515 liukun4515 merged commit 379f42c into apache:master Jun 30, 2022
@alamb alamb deleted the alamb/nullability_for_case branch July 1, 2022 20:11
ovr pushed a commit to cube-js/arrow-datafusion that referenced this pull request Aug 15, 2022
* Fix nullability calculation for CASE statements

* Remove println
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logical-expr Logical plan and expressions physical-expr Physical Expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants