adriangb commented on code in PR #23735:
URL: https://github.com/apache/datafusion/pull/23735#discussion_r3619925978


##########
datafusion/sqllogictest/test_files/type_coercion.slt:
##########
@@ -349,6 +349,23 @@ SELECT arrow_cast(t.s, 'Dictionary(Int32, Utf8)') SIMILAR 
TO p.pat FROM t CROSS
 ----
 true
 
+# non-scalar Utf8View / LargeUtf8 patterns are accepted by the SQL planner and
+# coerced by the analyzer (https://github.com/apache/datafusion/issues/23732)
+query B
+SELECT t.s SIMILAR TO arrow_cast(p.pat, 'Utf8View') FROM t CROSS JOIN p;
+----
+true
+
+query B
+SELECT t.s SIMILAR TO arrow_cast(p.pat, 'LargeUtf8') FROM t CROSS JOIN p;
+----
+true
+
+query B
+SELECT t.s NOT SIMILAR TO arrow_cast(p.pat, 'Utf8View') FROM t CROSS JOIN p;
+----
+false
+

Review Comment:
   Can we add tests for teh null case?



-- 
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]

Reply via email to