You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2024/05/16 19:00:59 UTC

[I] Add an example of how to convert LogicalPlan to/from SQL Strings [datafusion]

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

   ### Is your feature request related to a problem or challenge?
   
   Having a good example helps to make features easier to use in DataFusion
   
   In this case the usecase is programmatic construction of SQL using the DataFUsion  LogicalPlan s using the api from https://github.com/apache/datafusion/issues/9726
   
   ### Describe the solution you'd like
   
   Extend the example from @edmondop 's great work in https://github.com/apache/datafusion/pull/10528 with the following cases:
   
   1. Create a plan using the DataFrame API and converting it back to SQL
   
   Bonus points for also adding
   3. Parse SQL like `SELECT * from foo` into a DataFrame, adding a filter, and then converting that back to SQL
   
   
   
   ### Describe alternatives you've considered
   
   
   
   Here is an example of creating a dataframe  example https://docs.rs/datafusion/latest/datafusion/index.html#dataframe
   
   You can call [`DataFrame::logical_plan`](https://docs.rs/datafusion/latest/datafusion/dataframe/struct.DataFrame.html#method.logical_plan) to get the plan
   
   Then call `plan_to_sql` and demonstrate the SQL that was created
   
   https://github.com/apache/datafusion/blob/842f3933e3496a022984c2a37254475a3bcde1bf/datafusion/sql/tests/sql_integration.rs#L4689C1-L4690C51
   
   ### Additional context
   
   _No response_


-- 
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-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Add an example of how to convert LogicalPlan to/from SQL Strings [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #10550: Add an example of how to convert LogicalPlan to/from SQL Strings
URL: https://github.com/apache/datafusion/issues/10550


-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org