| 583 | /// [`SessionContext::sql_with_options`]: crate::execution::context::SessionContext::sql_with_options |
| 584 | #[cfg(feature = "sql")] |
| 585 | pub async fn create_logical_plan( |
| 586 | &self, |
| 587 | sql: &str, |
| 588 | ) -> datafusion_common::Result<LogicalPlan> { |
| 589 | let dialect = self.config.options().sql_parser.dialect; |
| 590 | let statement = self.sql_to_statement(sql, &dialect)?; |
| 591 | let plan = self.statement_to_plan(statement).await?; |
| 592 | Ok(plan) |
| 593 | } |
| 594 | |
| 595 | /// Creates a datafusion style AST [`Expr`] from a SQL string. |
| 596 | /// |