martin-g commented on code in PR #21420:
URL: https://github.com/apache/datafusion/pull/21420#discussion_r3044940280
##########
datafusion/sqllogictest/test_files/string/string_view.slt:
##########
@@ -954,6 +954,71 @@ SELECT arrow_typeof(split_part(arrow_cast('a.b.c',
'Utf8View'), '.', 2));
----
Utf8View
+# SPLIT_PART with Utf8View column (exercises the array fast path)
+query T
+SELECT split_part(column1_utf8view, 'ph', 1) FROM test;
+----
+Andrew
+Xiangpeng
+Ra
+(empty)
+NULL
+
+query T
+SELECT split_part(column1_utf8view, 'ph', 2) FROM test;
+----
+(empty)
+(empty)
+ael
+(empty)
+NULL
+
+# Negative position
+query T
+SELECT split_part(column1_utf8view, 'ph', -1) FROM test;
+----
+Andrew
+Xiangpeng
+ael
+(empty)
+NULL
+
+# Delimiter not found returns full string
+query T
+SELECT split_part(column1_utf8view, 'ZZZ', 1) FROM test;
+----
+Andrew
+Xiangpeng
+Raphael
+(empty)
+NULL
Review Comment:
There are no results which are longer than 12 bytes to test the logic at
https://github.com/apache/datafusion/pull/21420/changes#diff-b6956854ebac57e45bce9547ea87fb3fa74dbbb02f165e3c0e836220e5c14d40R498
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]