diff --git a/datafusion/sqllogictest/test_files/string/string_query.slt.part b/datafusion/sqllogictest/test_files/string/string_query.slt.part index 80fcc0102887..c34b9af21a72 100644 --- a/datafusion/sqllogictest/test_files/string/string_query.slt.part +++ b/datafusion/sqllogictest/test_files/string/string_query.slt.part @@ -19,6 +19,10 @@ # with standard values, but different types in string columns # (String, StringView, etc.) +# -------------------------------------- +# Show the input data +# -------------------------------------- + # select query TTTT SELECT ascii_1, ascii_2, unicode_1, unicode_2 FROM test_basic_operator @@ -35,6 +39,41 @@ _ \_ (empty) (empty) NULL % NULL NULL NULL R NULL 🔥 +# -------------------------------------- +# test type coercion (compare to int) +# queries should not error +# -------------------------------------- + +query BB +select ascii_1 = 1 as col1, ascii_1 = 1 as col2 from test_basic_operator; +---- +false false +false false +false false +false false +false false +false false +false false +false false +false false +NULL NULL +NULL NULL + +query BB +select ascii_1 <> 1 as col1, ascii_1 <> 1 as col2 from test_basic_operator; +---- +true true +true true +true true +true true +true true +true true +true true +true true +true true +NULL NULL +NULL NULL + # -------------------------------------- # column comparison as filters # --------------------------------------