You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: support unnest in GROUP BY clause (apache#11469)
* feat: support group by unnest
* pass slt
* refactor: mv process_group_by_unnest into try_process_unnest
* chore: add some documentation comments and tests
* Avoid cloning input
* use consistent field names
---------
Co-authored-by: Andrew Lamb <[email protected]>
Copy file name to clipboardExpand all lines: datafusion/sqllogictest/test_files/unnest.slt
+132-2Lines changed: 132 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -500,8 +500,6 @@ select unnest(column1) from (select * from (values([1,2,3]), ([4,5,6])) limit 1
500
500
query error DataFusion error: Error during planning: Projections require unique expression names but the expression "UNNEST\(Column\(Column \{ relation: Some\(Bare \{ table: "unnest_table" \}\), name: "column1" \}\)\)" at position 0 and "UNNEST\(Column\(Column \{ relation: Some\(Bare \{ table: "unnest_table" \}\), name: "column1" \}\)\)" at position 1 have the same name. Consider aliasing \("AS"\) one of them.
501
501
select unnest(column1), unnest(column1) from unnest_table;
502
502
503
-
statement ok
504
-
drop table unnest_table;
505
503
506
504
## unnest list followed by unnest struct
507
505
query ???
@@ -557,3 +555,135 @@ physical_plan
557
555
06)----------UnnestExec
558
556
07)------------ProjectionExec: expr=[column3@0 as unnest(recursive_unnest_table.column3), column3@0 as column3]
0 commit comments