wjones127 commented on issue #11477:
URL: https://github.com/apache/datafusion/issues/11477#issuecomment-2229673349

   > We assume planner should exist, at least with datafusion's builtin one, 
otherwise we don't know how to handle it thus throws error for the case.
   
   I'm not sure I understand your answer. When we call 
`SessionState::default()`, all the correct planners are registered. For 
example, it already has the `ArrayFunctionPlanner` it should need to parse 
array literals.
   
   What I'm confused by is that I have to do this additional step to propagate 
it to `SqlToRel`:
   
   ```rust
   let session_state: SessionState = ...;
   let mut sql_to_rel = SqlToRel::new(...);
   for planner in session_state.expr_planners() {
       sql_to_rel = sql_to_rel.with_user_defined_planner(planner.clone());
   }
   ```
   
   Why do I have to do that? Why doesn't `SqlToRel` copy the expression 
planners from the `ContextProvider` that was passed in?


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

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