forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-49164][SQL] Fix not NullSafeEqual in predicate of SQL query in…
… JDBC Relation ### What changes were proposed in this pull request? Changed the evaluation of <=> (NullEqualSafe) in V2ExpressionSQLBuilder.scala. If there was a predicate like where not str <=> 'abc' and if there are null values in the table, null tables are not returned even though they should. The issue was in how <=> is translated to SQL string therefore producing wrong results. ### Why are the changes needed? There is a bug currently. ### Does this PR introduce _any_ user-facing change? Yes, since users can get different results now. ### How was this patch tested? Existing tests were modified and one new test is added. ### Was this patch authored or co-authored using generative AI tooling? Closes apache#47669 from PetarVasiljevic-DB/fix_not_null_safe_equal. Authored-by: Petar Vasiljevic <petar.vasiljevic@databricks.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
- Loading branch information
1 parent
2465cb0
commit cb7919b
Showing
4 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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 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 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 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