You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: datafusion/sqllogictest/test_files/string_view.slt
+44-12Lines changed: 44 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -425,6 +425,50 @@ logical_plan
425
425
01)Projection: starts_with(test.column1_utf8view, Utf8View("äöüß")) AS c1, starts_with(test.column1_utf8view, Utf8View("")) AS c2, starts_with(test.column1_utf8view, Utf8View(NULL)) AS c3, starts_with(Utf8View(NULL), test.column1_utf8view) AS c4
426
426
02)--TableScan: test projection=[column1_utf8view]
427
427
428
+
### Initcap
429
+
430
+
query TT
431
+
EXPLAIN SELECT
432
+
INITCAP(column1_utf8view) as c
433
+
FROM test;
434
+
----
435
+
logical_plan
436
+
01)Projection: initcap(test.column1_utf8view) AS c
437
+
02)--TableScan: test projection=[column1_utf8view]
438
+
439
+
# Create a table with lowercase strings
440
+
statement ok
441
+
CREATE TABLE test_lowercase AS SELECT
442
+
lower(column1_utf8) as column1_utf8_lower,
443
+
lower(column1_large_utf8) as column1_large_utf8_lower,
444
+
lower(column1_utf8view) as column1_utf8view_lower
445
+
FROM test;
446
+
447
+
# Test INITCAP with utf8view, utf8, and largeutf8
448
+
# Should not cast anything
449
+
query TT
450
+
EXPLAIN SELECT
451
+
INITCAP(column1_utf8view_lower) as c1,
452
+
INITCAP(column1_utf8_lower) as c2,
453
+
INITCAP(column1_large_utf8_lower) as c3
454
+
FROM test_lowercase;
455
+
----
456
+
logical_plan
457
+
01)Projection: initcap(test_lowercase.column1_utf8view_lower) AS c1, initcap(test_lowercase.column1_utf8_lower) AS c2, initcap(test_lowercase.column1_large_utf8_lower) AS c3
0 commit comments