Skip to content

Commit 2ad28e0

Browse files
authored
chore: Add more LIKE with escape tests (#14501)
Add test cases for the bug recently fixed in Arrow.
1 parent 1cefe50 commit 2ad28e0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

datafusion/sqllogictest/test_files/string/string_literal.slt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -862,26 +862,29 @@ true true true true
862862
# Escapes
863863

864864
# \ is an implicit escape character
865-
query BBBB
865+
query BBBBBB
866866
SELECT
867867
'a' LIKE '\%',
868868
'\a' LIKE '\%',
869+
'\a' LIKE '\\%',
869870
'%' LIKE '\%',
870-
'\%' LIKE '\%'
871+
'\%' LIKE '\%',
872+
'\%' LIKE '\\%'
871873
----
872-
false false true false
874+
false false true true false true
873875

874876
# \ is an implicit escape character
875-
query BBBBBB
877+
query BBBBBBB
876878
SELECT
877879
'a' LIKE '\_',
878880
'\a' LIKE '\_',
881+
'\a' LIKE '\\_',
879882
'_' LIKE '\_',
880883
'\_' LIKE '\_',
881884
'abc' LIKE 'a_c',
882885
'abc' LIKE 'a\_c'
883886
----
884-
false false true false true false
887+
false false true true false true false
885888

886889
query BBBB
887890
SELECT

0 commit comments

Comments
 (0)