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

   I think you can do this today via 
[`SqlToRel::sql_to_expr`](https://docs.rs/datafusion/latest/datafusion/sql/planner/struct.SqlToRel.html#method.sql_to_expr)
 
   
   
   ## Step 1:  Add an example to show how to use `SqlToRel::sql_to_expr`
   
    So add  an example (perhaps `expr_to_sql.rs`) in
   
https://github.com/apache/arrow-datafusion/tree/main/datafusion-examples/examples
 that showed how to call `SqlToRel` to parser the expression above
   
   ## Step 2: Add an API to DataFusion that made parsing SQL easier 
   
   The idea is to avoid requiring  PlannerContext, a `DFSchema`, etc). 
   
   For example:
   ```rust
   let expr: Expr = parse_expr("c < 5")?;
   ```
   
   Note this doesn't provide a schema. 
   


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