avantgardnerio commented on code in PR #4958:
URL: https://github.com/apache/arrow-datafusion/pull/4958#discussion_r1073760608
##########
datafusion/core/src/execution/context.rs:
##########
@@ -1729,6 +1741,15 @@ impl SessionState {
query.statement_to_plan(statement)
}
+ /// Creates a [`LogicalPlan`] from the provided SQL string
+ ///
+ /// See [`SessionContext::sql`] for a higher-level interface that also
handles DDL
+ pub async fn create_logical_plan(&self, sql: &str) -> Result<LogicalPlan> {
+ let statement = self.sql_to_statement(sql)?;
+ let plan = self.statement_to_plan(statement).await?;
+ Ok(plan)
+ }
Review Comment:
@gruuya your suggestion makes sense and I'd be amenable to merging a PR
containing the changes you described, but in the interest of expedience, given
the approvals on this PR, I'd like to merge it as-is.
If you file an issue, I can take a look next time I'm free.
--
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]