u70b3 commented on code in PR #23735: URL: https://github.com/apache/datafusion/pull/23735#discussion_r3621148251
########## 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: Done in add3f8de8 — added a literal NULL pattern in the table context and a non-scalar Null-typed pattern column (CREATE TABLE pn AS SELECT NULL AS pat), both evaluate to NULL. -- 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]
