alamb commented on issue #8245:
URL: 
https://github.com/apache/arrow-datafusion/issues/8245#issuecomment-1834504399

   
   > I don't think 1 and 2 need to support named queries, just support 3
   
   I don't fully understand what you are suggesting here. 
   
   I thought the proposal was to change 
https://docs.rs/datafusion/latest/datafusion/dataframe/struct.DataFrame.html#method.with_param_values
 to take a different API, perhaps like
   
   ```rust
   pub fn with_param_values(self, param_values: Impl IntoIterator<Item = (&str, 
ScalarValue)>) -> Result<Self>
   ```
   
   So you could call it like
   ```
   let results = ctx
     .sql("SELECT a FROM example WHERE b = $foo")
     .await?
      // replace $foo with value 2
     .with_param_values(vec![
        "$foo", ScalarValue::from(2i64)
      ])?
     .collect()
     .await?;
   ```
   
   


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

Reply via email to