Skip to content

Commit 264523b

Browse files
committed
Minor: Add tests for StringView / character functions
1 parent fa50636 commit 264523b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

datafusion/sqllogictest/test_files/string_view.slt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,23 @@ logical_plan
322322
03)----TableScan: test projection=[column1_utf8, column2_utf8, column1_utf8view]
323323

324324

325+
# Ensure string functions use native StringView implementation
326+
# and do not fall back to Utf8 or LargeUtf8
327+
# Should see no casts to Utf8 in the plans below
328+
329+
query TT
330+
EXPLAIN SELECT
331+
column1_utf8view like 'foo' as "like",
332+
column1_utf8view ilike 'foo' as "ilike"
333+
FROM test;
334+
----
335+
logical_plan
336+
01)Projection: test.column1_utf8view LIKE Utf8View("foo") AS like, test.column1_utf8view ILIKE Utf8View("foo") AS ilike
337+
02)--TableScan: test projection=[column1_utf8view]
338+
339+
340+
341+
325342
statement ok
326343
drop table test;
327344

0 commit comments

Comments
 (0)