Skip to content

Support GROUP BY and DISTINCT with FixedSizeList values #16442

@findepi

Description

@findepi

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 apache/arrow-rs#7705

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions