colinmarc commented on issue #11021:
URL: https://github.com/apache/datafusion/issues/11021#issuecomment-6293325676

   I'm not sure if this is the right issue, but we would also like to use named 
placeholders in `SELECT`. 
   
   There's a fixme for this in the source:
   
   
https://github.com/apache/datafusion/blob/500744d5c25499055e3b2ca46b022bc425989203/datafusion/sql/src/expr/value.rs#L141-L143
   
   Our ideal workflow would be something like:
   
    - Use `PlannerContext::new().with_prepare_param_data_types(ts)` to pass 
(named!) parameter types into `SqlToRel`
    - Much later, bind values to the plan using 
`with_param_values(ParamValues::Map(...)`
   
   That doesn't work, because the planner always uses positional placeholders. 
That means we have to use `ParamValues::List` and get the order exactly right, 
which is brittle. 


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