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
* draft implement utf8_view for replace
* add function signature
* Add sql test
* move macro util to replace function
* remove unused import
* rust format
* change return type from utf8view to utf8
---------
Co-authored-by: Andrew Lamb <[email protected]>
Copy file name to clipboardExpand all lines: datafusion/sqllogictest/test_files/string_view.slt
+14-5Lines changed: 14 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -925,7 +925,6 @@ logical_plan
925
925
01)Projection: regexp_replace(test.column1_utf8view, Utf8("^https?://(?:www\.)?([^/]+)/.*$"), Utf8("\1")) AS k
926
926
02)--TableScan: test projection=[column1_utf8view]
927
927
928
-
929
928
## Ensure no casts for REPEAT
930
929
query TT
931
930
EXPLAIN SELECT
@@ -937,17 +936,27 @@ logical_plan
937
936
02)--TableScan: test projection=[column1_utf8view]
938
937
939
938
## Ensure no casts for REPLACE
940
-
## TODO file ticket
941
939
query TT
942
940
EXPLAIN SELECT
943
941
REPLACE(column1_utf8view, 'foo', 'bar') as c1,
944
942
REPLACE(column1_utf8view, column2_utf8view, 'bar') as c2
945
943
FROM test;
946
944
----
947
945
logical_plan
948
-
01)Projection: replace(__common_expr_1, Utf8("foo"), Utf8("bar")) AS c1, replace(__common_expr_1, CAST(test.column2_utf8view AS Utf8), Utf8("bar")) AS c2
949
-
02)--Projection: CAST(test.column1_utf8view AS Utf8) AS __common_expr_1, test.column2_utf8view
950
-
03)----TableScan: test projection=[column1_utf8view, column2_utf8view]
946
+
01)Projection: replace(test.column1_utf8view, Utf8View("foo"), Utf8View("bar")) AS c1, replace(test.column1_utf8view, test.column2_utf8view, Utf8View("bar")) AS c2
947
+
02)--TableScan: test projection=[column1_utf8view, column2_utf8view]
948
+
949
+
query TT
950
+
SELECT
951
+
REPLACE(column1_utf8view, 'foo', 'bar') as c1,
952
+
REPLACE(column1_utf8view, column2_utf8view, 'bar') as c2
0 commit comments