datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Support GROUP BY and DISTINCT with FixedSizeList values

Open findepi opened this issue 8 months ago • 0 comments

Is your feature request related to a problem or challenge?

This should work

$ git diff datafusion/sqllogictest/test_files/array.slt
diff --git datafusion/sqllogictest/test_files/array.slt datafusion/sqllogictest/test_files/array.slt
index a2640fa98..0e5644a89 100644
--- datafusion/sqllogictest/test_files/array.slt
+++ datafusion/sqllogictest/test_files/array.slt
@@ -7936,6 +7936,18 @@ select arrow_typeof(a) from fixed_size_col_table;
 FixedSizeList(Field { name: "item", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, 3)
 FixedSizeList(Field { name: "item", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, 3)

+query ?
+SELECT DISTINCT a FROM fixed_size_col_table
+----
+[1, 2, 3]
+[4, 5, 6]
+
+query ?I
+SELECT a, count(*) FROM fixed_size_col_table GROUP BY a
+----
+[1, 2, 3] 1
+[4, 5, 6] 1
+
 statement error
 create table varying_fixed_size_col_table (a int[3]) as values ([1,2,3]), ([4,5]);

Describe the solution you'd like

No response

Describe alternatives you've considered

Perhaps https://github.com/apache/arrow-rs/pull/7705

Additional context

No response

findepi avatar Jun 18 '25 13:06 findepi