MCPcopy Create free account
hub / github.com/apache/datafusion / create_logical_plan

Method create_logical_plan

datafusion/core/src/execution/session_state.rs:585–593  ·  view source on GitHub ↗
(
        &self,
        sql: &str,
    )

Source from the content-addressed store, hash-verified

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

Calls 3

sql_to_statementMethod · 0.80
optionsMethod · 0.45
statement_to_planMethod · 0.45