Skip to content

Commit

Permalink
chore: Add more LIKE with escape tests (apache#14501)
Browse files Browse the repository at this point in the history
Add test cases for the bug recently fixed in Arrow.
  • Loading branch information
findepi authored Feb 5, 2025
1 parent 1cefe50 commit 2ad28e0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions datafusion/sqllogictest/test_files/string/string_literal.slt
Original file line number Diff line number Diff line change
Expand Up @@ -862,26 +862,29 @@ true true true true
# Escapes

# \ is an implicit escape character
query BBBB
query BBBBBB
SELECT
'a' LIKE '\%',
'\a' LIKE '\%',
'\a' LIKE '\\%',
'%' LIKE '\%',
'\%' LIKE '\%'
'\%' LIKE '\%',
'\%' LIKE '\\%'
----
false false true false
false false true true false true

# \ is an implicit escape character
query BBBBBB
query BBBBBBB
SELECT
'a' LIKE '\_',
'\a' LIKE '\_',
'\a' LIKE '\\_',
'_' LIKE '\_',
'\_' LIKE '\_',
'abc' LIKE 'a_c',
'abc' LIKE 'a\_c'
----
false false true false true false
false false true true false true false

query BBBB
SELECT
Expand Down

0 comments on commit 2ad28e0

Please sign in to comment.