-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail if compare null for complex type in contains (#7273)
Summary: In Presto, `contains` is applied to arrays of complex types with nested nulls may or may not fail depending on whether need to compare the nulls or not. ```SQL presto> select contains(col0, col1) from (values (array[array[1, 3]], array[2, null])) as tbl(col0, col1); _col0 ------- false (1 row) presto> select contains(col0, col1) from (values (array[array[2, 3]], array[2, null])) as tbl(col0, col1); Query 20231027_015548_00004_whazu failed: contains does not support arrays with elements that are null or contain null presto> select contains(col0, col1) from (values (array[array[2, null]], array[2, 3])) as tbl(col0, col1); Query 20231027_015600_00005_whazu failed: contains does not support arrays with elements that are null or contain null presto> select contains(col0, col1) from (values (array[array[1, null]], array[2, 3])) as tbl(col0, col1); _col0 ------- false (1 row) ``` This PR check the equal result and `setError` if compare the nested nulls of complex type. Pull Request resolved: #7273 Reviewed By: xiaoxmeng, Yuhta Differential Revision: D50793771 Pulled By: mbasmanova fbshipit-source-id: 991d018ea79fe46ec4746c0038160ead64e5cb70
- Loading branch information
1 parent
b9984b4
commit a9e4203
Showing
3 changed files
with
88 additions
and
10 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