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

   [see 
here](https://github.com/apache/datafusion/blob/7a1a23d5f50cd113613cf54ee5346f0e83d1edc4/datafusion/core/src/execution/session_state.rs#L1501C1-L1504C6)
   
   Basically this implementation uses a private field access on `SessionState` 
to return the slice, for us normals we have to call `expr_planners() which will 
give us a 
[Vec](https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html)<[Arc](https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html)<dyn
 
[ExprPlanner](https://docs.rs/datafusion/latest/datafusion/logical_expr/planner/trait.ExprPlanner.html)>>
   
   To not share a temporary value in my ContextProvider implementation of 
`get_expr_planners` I have to hold onto the Vec in my own state which feels 
clunky compared to other functions like `udfs()` where I'm just returning 
`self.state.scalar_functions().keys().cloned().collect()ยท`
   
   I think changing the API to use Vec rather than a slice would be more 
symmetrical and easier to just defer up to SessionState in my impl


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to