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

   ### Describe the bug
   
   When upgrading to DataFusion 40, I kept on encountering this error:
   
   ```
   Internal error: Expected a simplified result, but none was found.
   ```
   
   This happened when parsing a array literal. It seems in order to parse it, 
we need to register the proper `ExprPlanner` on the `SessionState`. We use 
`SessionState::default()`, which registers it for us. But then it's not being 
propagated to `SqlToRel`, so it fails.
   
   
https://github.com/apache/datafusion/blob/f204869ff55bb3e39cf23fc0a34ebd5021e6773f/datafusion/sql/src/planner.rs#L206-L213
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   I'm not sure I understand the design, but it seems odd we don't propagate 
these. At the very least, we should provide a warning in the docs.
   
   ### Additional context
   
   Current workaround:
   
   ```
   for planner in context_provider.state.expr_planners() {
       sql_to_rel = sql_to_rel.with_user_defined_planner(planner.clone());
   }
   ```


-- 
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