-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed as not planned
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
See reproducer.
To Reproduce
Use the following sqllogictest:
statement ok
CREATE TABLE lists_of_structs_table
AS VALUES
('row1', [named_struct('a', 1, 'b', 2), named_struct('a', 2, 'b', 3)]),
('row2', [named_struct('a', 4, 'b', 5)])
;
query T?
select column1, unnest(column2) from lists_of_structs_table;
----
row1 {a: 1, b: 2}
row1 {a: 2, b: 3}
row2 {a: 4, b: 5}
# unnest + struct element access
query error DataFusion error: Schema error: No field named b. Valid fields are lists_of_structs_table.column1, lists_of_structs_table.column2.
select column1, unnest(column2)["b"] from lists_of_structs_table;
Expected behavior
Since unnest
creates a struct column, I feel that this should work.
Additional context
Tested w/ 5391c98 .
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working