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

Update tests and resolve TODOs after arrow update #13538

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions datafusion/sqllogictest/test_files/string/dictionary_utf8.slt
Original file line number Diff line number Diff line change
Expand Up @@ -42,43 +42,6 @@ SELECT arrow_cast('', 'Dictionary(Int32, Utf8)');
----
(empty)

# TODO: move it back to `string_query.slt.part` after fixing the issue
# see detail: https://github.com/apache/datafusion/issues/12637
# Test pattern with wildcard characters
query TTBBBB
select ascii_1, unicode_1,
ascii_1 like 'An%' as ascii_like,
unicode_1 like '%ion数据%' as unicode_like,
ascii_1 ilike 'An%' as ascii_ilike,
unicode_1 ilike '%ion数据%' as unicode_ilik
from test_basic_operator;
----
Andrew datafusion📊🔥 true false true false
Xiangpeng datafusion数据融合 false true false true
Raphael datafusionДатаФусион false false false false
under_score un iść core false false false false
percent pan Tadeusz ma iść w kąt false false false false
(empty) (empty) false false false false
% (empty) false false false false
_ (empty) false false false false
NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL

# TODO: move it back to `string_query.slt.part` after fixing the issue
# see issue https://github.com/apache/datafusion/issues/13329
query IIII
select bit_length(ascii_1), bit_length(ascii_2), bit_length(unicode_1), bit_length(unicode_2) from test_basic_operator;
----
48 8 144 32
72 72 176 176
56 8 240 64
88 88 104 256
56 24 216 288
0 8 0 0
8 16 0 0
8 16 0 0
NULL 8 NULL NULL
NULL 8 NULL 32

#
# common test for string-like functions and operators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# specific language governing permissions and limitations
# under the License.

# TODO (https://github.com/apache/datafusion/issues/12637): add a row with '%%' pattern
statement ok
create table test_source as values
('Andrew', 'X', 'datafusion📊🔥', '🔥'),
Expand All @@ -24,6 +23,7 @@ create table test_source as values
('under_score', 'un_____core', 'un iść core', 'chrząszcz na łące w 東京都'),
('percent', 'p%t', 'pan Tadeusz ma iść w kąt', 'Pan Tadeusz ma frunąć stąd w kąt'),
('', '%', '', ''),
('', '%%', '', ''),
('%', '\%', '', ''),
('_', '\_', '', ''),
(NULL, '%', NULL, NULL),
Expand Down
39 changes: 1 addition & 38 deletions datafusion/sqllogictest/test_files/string/large_string.slt
Original file line number Diff line number Diff line change
Expand Up @@ -44,49 +44,12 @@ Raphael R datafusionДатаФусион аФус
under_score un_____core un iść core chrząszcz na łące w 東京都
percent p%t pan Tadeusz ma iść w kąt Pan Tadeusz ma frunąć stąd w kąt
(empty) % (empty) (empty)
(empty) %% (empty) (empty)
% \% (empty) (empty)
_ \_ (empty) (empty)
NULL % NULL NULL
NULL R NULL 🔥

# TODO: move it back to `string_query.slt.part` after fixing the issue
# see detail: https://github.com/apache/datafusion/issues/12637
# Test pattern with wildcard characters
query TTBBBB
select ascii_1, unicode_1,
ascii_1 like 'An%' as ascii_like,
unicode_1 like '%ion数据%' as unicode_like,
ascii_1 ilike 'An%' as ascii_ilike,
unicode_1 ilike '%ion数据%' as unicode_ilik
from test_basic_operator;
----
Andrew datafusion📊🔥 true false true false
Xiangpeng datafusion数据融合 false true false true
Raphael datafusionДатаФусион false false false false
under_score un iść core false false false false
percent pan Tadeusz ma iść w kąt false false false false
(empty) (empty) false false false false
% (empty) false false false false
_ (empty) false false false false
NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL

# TODO: move it back to `string_query.slt.part` after fixing the issue
# see issue https://github.com/apache/datafusion/issues/13329
query IIII
select bit_length(ascii_1), bit_length(ascii_2), bit_length(unicode_1), bit_length(unicode_2) from test_basic_operator;
----
48 8 144 32
72 72 176 176
56 8 240 64
88 88 104 256
56 24 216 288
0 8 0 0
8 16 0 0
8 16 0 0
NULL 8 NULL NULL
NULL 8 NULL 32

#
# common test for string-like functions and operators
#
Expand Down
46 changes: 10 additions & 36 deletions datafusion/sqllogictest/test_files/string/string.slt
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,7 @@ statement ok
create table test_substr as
select arrow_cast(col1, 'Utf8') as c1 from test_substr_base;

# TODO: move it back to `string_query.slt.part` after fixing the issue
# see detail: https://github.com/apache/datafusion/issues/12637
# Test pattern with wildcard characters
query TTBBBB
select ascii_1, unicode_1,
ascii_1 like 'An%' as ascii_like,
unicode_1 like '%ion数据%' as unicode_like,
ascii_1 ilike 'An%' as ascii_ilike,
unicode_1 ilike '%ion数据%' as unicode_ilik
from test_basic_operator;
----
Andrew datafusion📊🔥 true false true false
Xiangpeng datafusion数据融合 false true false true
Raphael datafusionДатаФусион false false false false
under_score un iść core false false false false
percent pan Tadeusz ma iść w kąt false false false false
(empty) (empty) false false false false
% (empty) false false false false
_ (empty) false false false false
NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL


#
# common test for string-like functions and operators
Expand All @@ -80,6 +60,9 @@ SELECT unicode_2, 'is NOT LIKE', ascii_2 FROM test_basic_operator WHERE unicode_
(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 \_
Expand Down Expand Up @@ -115,6 +98,7 @@ 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
Expand Down Expand Up @@ -143,6 +127,9 @@ SELECT unicode_2, 'is NOT ILIKE', ascii_2 FROM test_basic_operator WHERE unicode
(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 \_
Expand Down Expand Up @@ -178,6 +165,7 @@ 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
Expand All @@ -187,21 +175,7 @@ _ \_ (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

# TODO: move it back to `string_query.slt.part` after fixing the issue
# see issue https://github.com/apache/datafusion/issues/13329
query IIII
select bit_length(ascii_1), bit_length(ascii_2), bit_length(unicode_1), bit_length(unicode_2) from test_basic_operator;
----
48 8 144 32
72 72 176 176
56 8 240 64
88 88 104 256
56 24 216 288
0 8 0 0
8 16 0 0
8 16 0 0
NULL 8 NULL NULL
NULL 8 NULL 32


#
# Clean up
Expand Down
Loading