alamb commented on code in PR #6895: URL: https://github.com/apache/arrow-datafusion/pull/6895#discussion_r1257494735
########## datafusion/core/tests/sqllogictests/test_files/binary.slt: ########## @@ -73,3 +73,57 @@ GROUP BY column1; 1 1 1 + +statement ok +drop table t; + +############# +## Tests for FixedSizeBinary +############# + +# fixed_size_binary +statement ok +CREATE TABLE t_source +AS VALUES + (X'000102', X'000102'), + (X'003102', X'000102'), + (NULL, X'000102'), + (X'FF0102', X'000102'), + (X'000102', X'000102') +; + +# Create a table with FixedSizeBinary +statement ok +CREATE TABLE t +AS SELECT + arrow_cast(column1, 'FixedSizeBinary(3)') as "column1", + arrow_cast(column2, 'FixedSizeBinary(3)') as "column2" +FROM t_source; + +query ?T +SELECT column1, arrow_typeof(column1) FROM t; +---- +000102 FixedSizeBinary(3) +003102 FixedSizeBinary(3) +NULL FixedSizeBinary(3) +ff0102 FixedSizeBinary(3) +000102 FixedSizeBinary(3) + +# Comparison +# https://github.com/apache/arrow-datafusion/pull/6891 +query error DataFusion error: Internal error: Data type FixedSizeBinary\(3, "0,1,2"\) not supported for scalar operation 'eq' on dyn array\. This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker Review Comment: This should work after https://github.com/apache/arrow-datafusion/pull/6891 -- 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]
