-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fully support LIKE/ILIKE with Utf8View #14379
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,141 +41,6 @@ select arrow_cast(col1, 'Utf8') as c1 from test_substr_base; | |
# | ||
include ./string_query.slt.part | ||
|
||
# TODO support all String types in sql_like_to_expr and move this test to `string_query.slt.part` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By moving these tests to FYI @goldmedal |
||
# dynamic LIKE as filter | ||
query TTT rowsort | ||
SELECT ascii_1, 'is LIKE', ascii_2 FROM test_basic_operator WHERE ascii_1 LIKE ascii_2 | ||
UNION ALL | ||
SELECT ascii_1, 'is NOT LIKE', ascii_2 FROM test_basic_operator WHERE ascii_1 NOT LIKE ascii_2 | ||
UNION ALL | ||
SELECT unicode_1, 'is LIKE', ascii_2 FROM test_basic_operator WHERE unicode_1 LIKE ascii_2 | ||
UNION ALL | ||
SELECT unicode_1, 'is NOT LIKE', ascii_2 FROM test_basic_operator WHERE unicode_1 NOT LIKE ascii_2 | ||
UNION ALL | ||
SELECT unicode_2, 'is LIKE', ascii_2 FROM test_basic_operator WHERE unicode_2 LIKE ascii_2 | ||
UNION ALL | ||
SELECT unicode_2, 'is NOT LIKE', ascii_2 FROM test_basic_operator WHERE unicode_2 NOT LIKE ascii_2 | ||
---- | ||
% is LIKE \% | ||
(empty) is LIKE % | ||
(empty) is LIKE % | ||
(empty) is LIKE % | ||
(empty) is LIKE %% | ||
(empty) is LIKE %% | ||
(empty) is LIKE %% | ||
(empty) is NOT LIKE \% | ||
(empty) is NOT LIKE \% | ||
(empty) is NOT LIKE \_ | ||
(empty) is NOT LIKE \_ | ||
Andrew is NOT LIKE X | ||
Pan Tadeusz ma frunąć stąd w kąt is NOT LIKE p%t | ||
Raphael is NOT LIKE R | ||
Xiangpeng is LIKE Xiangpeng | ||
_ is LIKE \_ | ||
chrząszcz na łące w 東京都 is NOT LIKE un_____core | ||
datafusionДатаФусион is NOT LIKE R | ||
datafusion数据融合 is NOT LIKE Xiangpeng | ||
datafusion数据融合 is NOT LIKE Xiangpeng | ||
datafusion📊🔥 is NOT LIKE X | ||
pan Tadeusz ma iść w kąt is LIKE p%t | ||
percent is LIKE p%t | ||
un iść core is LIKE un_____core | ||
under_score is LIKE un_____core | ||
аФус is NOT LIKE R | ||
🔥 is NOT LIKE R | ||
🔥 is NOT LIKE X | ||
|
||
# TODO support all String types in sql_like_to_expr and move this test to `string_query.slt.part` | ||
# dynamic LIKE as projection | ||
query TTTTBBBB rowsort | ||
SELECT | ||
ascii_1, ascii_2, unicode_1, unicode_2, | ||
(ascii_1 LIKE ascii_2) AS ascii_1_like_ascii_2, | ||
(ascii_2 LIKE ascii_1) AS ascii_2_like_ascii_1, | ||
(unicode_1 LIKE ascii_2) AS unicode_1_like_ascii_2, | ||
(unicode_2 LIKE ascii_2) AS unicode_2_like_ascii_2 | ||
FROM test_basic_operator | ||
---- | ||
% \% (empty) (empty) true true false false | ||
(empty) % (empty) (empty) true false true true | ||
(empty) %% (empty) (empty) true false true true | ||
Andrew X datafusion📊🔥 🔥 false false false false | ||
NULL % NULL NULL NULL NULL NULL NULL | ||
NULL R NULL 🔥 NULL NULL NULL false | ||
Raphael R datafusionДатаФусион аФус false false false false | ||
Xiangpeng Xiangpeng datafusion数据融合 datafusion数据融合 true true false false | ||
_ \_ (empty) (empty) true false false false | ||
percent p%t pan Tadeusz ma iść w kąt Pan Tadeusz ma frunąć stąd w kąt true false true false | ||
under_score un_____core un iść core chrząszcz na łące w 東京都 true false true false | ||
|
||
# TODO support all String types in sql_like_to_expr and move this test to `string_query.slt.part` | ||
# dynamic ILIKE as filter | ||
query TTT rowsort | ||
SELECT ascii_1, 'is ILIKE', ascii_2 FROM test_basic_operator WHERE ascii_1 ILIKE ascii_2 | ||
UNION ALL | ||
SELECT ascii_1, 'is NOT ILIKE', ascii_2 FROM test_basic_operator WHERE ascii_1 NOT ILIKE ascii_2 | ||
UNION ALL | ||
SELECT unicode_1, 'is ILIKE', ascii_2 FROM test_basic_operator WHERE unicode_1 ILIKE ascii_2 | ||
UNION ALL | ||
SELECT unicode_1, 'is NOT ILIKE', ascii_2 FROM test_basic_operator WHERE unicode_1 NOT ILIKE ascii_2 | ||
UNION ALL | ||
SELECT unicode_2, 'is ILIKE', ascii_2 FROM test_basic_operator WHERE unicode_2 ILIKE ascii_2 | ||
UNION ALL | ||
SELECT unicode_2, 'is NOT ILIKE', ascii_2 FROM test_basic_operator WHERE unicode_2 NOT ILIKE ascii_2 | ||
---- | ||
% is ILIKE \% | ||
(empty) is ILIKE % | ||
(empty) is ILIKE % | ||
(empty) is ILIKE % | ||
(empty) is ILIKE %% | ||
(empty) is ILIKE %% | ||
(empty) is ILIKE %% | ||
(empty) is NOT ILIKE \% | ||
(empty) is NOT ILIKE \% | ||
(empty) is NOT ILIKE \_ | ||
(empty) is NOT ILIKE \_ | ||
Andrew is NOT ILIKE X | ||
Pan Tadeusz ma frunąć stąd w kąt is ILIKE p%t | ||
Raphael is NOT ILIKE R | ||
Xiangpeng is ILIKE Xiangpeng | ||
_ is ILIKE \_ | ||
chrząszcz na łące w 東京都 is NOT ILIKE un_____core | ||
datafusionДатаФусион is NOT ILIKE R | ||
datafusion数据融合 is NOT ILIKE Xiangpeng | ||
datafusion数据融合 is NOT ILIKE Xiangpeng | ||
datafusion📊🔥 is NOT ILIKE X | ||
pan Tadeusz ma iść w kąt is ILIKE p%t | ||
percent is ILIKE p%t | ||
un iść core is ILIKE un_____core | ||
under_score is ILIKE un_____core | ||
аФус is NOT ILIKE R | ||
🔥 is NOT ILIKE R | ||
🔥 is NOT ILIKE X | ||
|
||
# TODO support all String types in sql_like_to_expr and move this test to `string_query.slt.part` | ||
# dynamic ILIKE as projection | ||
query TTTTBBBB rowsort | ||
SELECT | ||
ascii_1, ascii_2, unicode_1, unicode_2, | ||
(ascii_1 ILIKE ascii_2) AS ascii_1_ilike_ascii_2, | ||
(ascii_2 ILIKE ascii_1) AS ascii_2_ilike_ascii_1, | ||
(unicode_1 ILIKE ascii_2) AS unicode_1_ilike_ascii_2, | ||
(unicode_2 ILIKE ascii_2) AS unicode_2_ilike_ascii_2 | ||
FROM test_basic_operator | ||
---- | ||
% \% (empty) (empty) true true false false | ||
(empty) % (empty) (empty) true false true true | ||
(empty) %% (empty) (empty) true false true true | ||
Andrew X datafusion📊🔥 🔥 false false false false | ||
NULL % NULL NULL NULL NULL NULL NULL | ||
NULL R NULL 🔥 NULL NULL NULL false | ||
Raphael R datafusionДатаФусион аФус false false false false | ||
Xiangpeng Xiangpeng datafusion数据融合 datafusion数据融合 true true false false | ||
_ \_ (empty) (empty) true false false false | ||
percent p%t pan Tadeusz ma iść w kąt Pan Tadeusz ma frunąć stąd w kąt true false true true | ||
under_score un_____core un iść core chrząszcz na łące w 東京都 true false true false | ||
|
||
|
||
|
||
# | ||
# Clean up | ||
|
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
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 is the code change -- don't do type checking in the planner