Skip to content

Commit

Permalink
Minor: Update string tests for strpos (#12739)
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb authored Oct 4, 2024
1 parent 48bff75 commit cf76aba
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 67 deletions.
17 changes: 0 additions & 17 deletions datafusion/sqllogictest/test_files/string/large_string.slt
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,6 @@ false false
false true
NULL NULL

# TODO: move it back to `string_query.slt.part` after fixing the issue
# see detail: https://github.com/apache/datafusion/issues/12670
query IIIIII
SELECT
STRPOS(ascii_1, 'e'),
STRPOS(ascii_1, 'ang'),
STRPOS(ascii_1, NULL),
STRPOS(unicode_1, 'и'),
STRPOS(unicode_1, 'ион'),
STRPOS(unicode_1, NULL)
FROM test_basic_operator;
----
5 0 NULL 0 0 NULL
7 3 NULL 0 0 NULL
6 0 NULL 18 18 NULL
NULL NULL NULL NULL NULL NULL

#
# common test for string-like functions and operators
#
Expand Down
17 changes: 0 additions & 17 deletions datafusion/sqllogictest/test_files/string/string.slt
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,6 @@ Xiangpeng datafusion数据融合 false true false true
Raphael datafusionДатаФусион false false false false
NULL NULL NULL NULL NULL NULL

# TODO: move it back to `string_query.slt.part` after fixing the issue
# see detail: https://github.com/apache/datafusion/issues/12670
query IIIIII
SELECT
STRPOS(ascii_1, 'e'),
STRPOS(ascii_1, 'ang'),
STRPOS(ascii_1, NULL),
STRPOS(unicode_1, 'и'),
STRPOS(unicode_1, 'ион'),
STRPOS(unicode_1, NULL)
FROM test_basic_operator;
----
5 0 NULL 0 0 NULL
7 3 NULL 0 0 NULL
6 0 NULL 18 18 NULL
NULL NULL NULL NULL NULL NULL

#
# common test for string-like functions and operators
#
Expand Down
30 changes: 14 additions & 16 deletions datafusion/sqllogictest/test_files/string/string_query.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -951,22 +951,20 @@ NULL NULL
# Test STRPOS
# --------------------------------------

# TODO: DictionaryString does not support STRPOS. Enable this after fixing the issue
# see issue: https://github.com/apache/datafusion/issues/12670
#query IIIIII
#SELECT
# STRPOS(ascii_1, 'e'),
# STRPOS(ascii_1, 'ang'),
# STRPOS(ascii_1, NULL),
# STRPOS(unicode_1, 'и'),
# STRPOS(unicode_1, 'ион'),
# STRPOS(unicode_1, NULL)
#FROM test_basic_operator;
#----
#5 0 NULL 0 0 NULL
#7 3 NULL 0 0 NULL
#6 0 NULL 18 18 NULL
#NULL NULL NULL NULL NULL NULL
query IIIIII
SELECT
STRPOS(ascii_1, 'e'),
STRPOS(ascii_1, 'ang'),
STRPOS(ascii_1, NULL),
STRPOS(unicode_1, 'и'),
STRPOS(unicode_1, 'ион'),
STRPOS(unicode_1, NULL)
FROM test_basic_operator;
----
5 0 NULL 0 0 NULL
7 3 NULL 0 0 NULL
6 0 NULL 18 18 NULL
NULL NULL NULL NULL NULL NULL

# --------------------------------------
# Test SUBSTR_INDEX
Expand Down
17 changes: 0 additions & 17 deletions datafusion/sqllogictest/test_files/string/string_view.slt
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,6 @@ false false
false true
NULL NULL

# TODO: move it back to `string_query.slt.part` after fixing the issue
# see detail: https://github.com/apache/datafusion/issues/12670
query IIIIII
SELECT
STRPOS(ascii_1, 'e'),
STRPOS(ascii_1, 'ang'),
STRPOS(ascii_1, NULL),
STRPOS(unicode_1, 'и'),
STRPOS(unicode_1, 'ион'),
STRPOS(unicode_1, NULL)
FROM test_basic_operator;
----
5 0 NULL 0 0 NULL
7 3 NULL 0 0 NULL
6 0 NULL 18 18 NULL
NULL NULL NULL NULL NULL NULL

#
# common test for string-like functions and operators
#
Expand Down

0 comments on commit cf76aba

Please sign in to comment.