You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "richox (via GitHub)" <gi...@apache.org> on 2024/12/23 11:57:41 UTC
[PR] fix case_column_or_null with nullable when conditions [datafusion]
richox opened a new pull request, #13886:
URL: https://github.com/apache/datafusion/pull/13886
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Closes #13885 .
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
## What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
## Are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
## Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api change` label.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix case_column_or_null with nullable when conditions [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #13886:
URL: https://github.com/apache/datafusion/pull/13886#issuecomment-2561866508
Thanks @richox and @xudong963 🙏
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix case_column_or_null with nullable when conditions [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #13886:
URL: https://github.com/apache/datafusion/pull/13886
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix case_column_or_null with nullable when conditions [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #13886:
URL: https://github.com/apache/datafusion/pull/13886#discussion_r1896165275
##########
datafusion/sqllogictest/test_files/case.slt:
##########
@@ -50,7 +50,7 @@ NULL
6
NULL
NULL
-7
+NULL
Review Comment:
Can you also please add a test to this file where there are no nulls (to ensure the codepath where `null_count = 0` is also covered)
##########
datafusion/sqllogictest/test_files/case.slt:
##########
@@ -61,7 +61,7 @@ NULL
6
NULL
NULL
-7
Review Comment:
sam thing here, `NULL > 2` is not `true` (it isn't false either, it is NULL) so this should not take the value of `b`
##########
datafusion/sqllogictest/test_files/case.slt:
##########
@@ -50,7 +50,7 @@ NULL
6
NULL
NULL
-7
Review Comment:
this last row has `a IS NULL`,`b = 7`
So the idea is that a > 2 is not true when `a IS NULL` so should fall through to the `ELSE null` clause
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix case_column_or_null with nullable when conditions [datafusion]
Posted by "richox (via GitHub)" <gi...@apache.org>.
richox commented on code in PR #13886:
URL: https://github.com/apache/datafusion/pull/13886#discussion_r1896512603
##########
datafusion/sqllogictest/test_files/case.slt:
##########
@@ -50,7 +50,7 @@ NULL
6
NULL
NULL
-7
+NULL
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org