-
Couldn't load subscription status.
- Fork 1.7k
Closed
Labels
bugSomething isn't workingSomething isn't workingregressionSomething that used to work no longer doesSomething that used to work no longer does
Description
Describe the bug
When running a query with named_struct in a subquery it fails with an error "NamedStructField should be rewritten in OperatorToFunction"
To Reproduce
Reproducer datafusion-cli:
❯ select (select struct(1, 'b')['c1']);
thread 'main' panicked at /Users/andrewlamb/Software/arrow-datafusion/datafusion/physical-expr/src/planner.rs:228:21:
internal error: entered unreachable code: NamedStructField should be rewritten in OperatorToFunction
note: run with `RUST_BACKTRACE=1` environment variable to display a backtraceNote a similar query works fine
❯ select * from (select struct(1, 'b')['c1']);
+--------------------------------+
| struct(Int64(1),Utf8("b"))[c1] |
+--------------------------------+
| b |
+--------------------------------+
1 row(s) fetched.
Elapsed 0.004 seconds.Expected behavior
This query worked in 36.0.0
DataFusion CLI v36.0.0
❯ select (select struct(1, 'b')['c1']);
+--------------------------------+
| struct(Int64(1),Utf8("b"))[c1] |
+--------------------------------+
| b |
+--------------------------------+
1 row in set. Query took 0.030 seconds.andrewlamb@Andrews-MacBook-Pro:~/Software/arrow-datafusion$
Additional context
This appears to have been introduced as part of #9583
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingregressionSomething that used to work no longer doesSomething that used to work no longer does