ahirner opened a new issue, #10764:
URL: https://github.com/apache/datafusion/issues/10764

   ### Describe the bug
   
   When selecting from a view that selects fields from structs, this error is 
thrown:
   ```
   Internal error: NamedStructField should be rewritten in OperatorToFunction.
   ```
   
   ### To Reproduce
   
   In datafusion 38.0.0 cli:
   ```
   > create or replace view v as select struct(1, 'b')['c1'];
   0 row(s) fetched.
   Elapsed 0.001 seconds.
   
   > select * from v;
   Internal error: NamedStructField should be rewritten in OperatorToFunction.
   This was likely caused by a bug in DataFusion's code and we would welcome 
that you file an bug report in our issue tracker
   ```
   
   ### Expected behavior
   
   ```
   +--------------------------------+
   | struct(Int64(1),Utf8("b"))[c1] |
   +--------------------------------+
   | b                              |
   +--------------------------------+
   1 row(s) fetched.
   ```
   
   ### Additional context
   
   It errors the same when a subquery is viewed: `create view v as select 
(select struct(1, 'b')['c1']);`.
   This error appeared once as a regression in 37.0: 
https://github.com/apache/datafusion/issues/10029


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to