pub struct SqlToRel<'a, S: ContextProvider> { /* private fields */ }
Expand description
SQL query planner
Implementations§
Source§impl<'a, S: ContextProvider> SqlToRel<'a, S>
impl<'a, S: ContextProvider> SqlToRel<'a, S>
Sourcepub fn sql_to_expr(
&self,
sql: SQLExpr,
schema: &DFSchema,
planner_context: &mut PlannerContext,
) -> Result<Expr>
pub fn sql_to_expr( &self, sql: SQLExpr, schema: &DFSchema, planner_context: &mut PlannerContext, ) -> Result<Expr>
Generate a relational expression from a SQL expression
Source§impl<'a, S: ContextProvider> SqlToRel<'a, S>
impl<'a, S: ContextProvider> SqlToRel<'a, S>
Sourcepub fn new_with_options(context_provider: &'a S, options: ParserOptions) -> Self
pub fn new_with_options(context_provider: &'a S, options: ParserOptions) -> Self
Create a new query planner
pub fn build_schema(&self, columns: Vec<SQLColumnDef>) -> Result<Schema>
Source§impl<'a, S: ContextProvider> SqlToRel<'a, S>
impl<'a, S: ContextProvider> SqlToRel<'a, S>
Sourcepub fn statement_to_plan(&self, statement: DFStatement) -> Result<LogicalPlan>
pub fn statement_to_plan(&self, statement: DFStatement) -> Result<LogicalPlan>
Generate a logical plan from an DataFusion SQL statement
Sourcepub fn sql_statement_to_plan(&self, statement: Statement) -> Result<LogicalPlan>
pub fn sql_statement_to_plan(&self, statement: Statement) -> Result<LogicalPlan>
Generate a logical plan from an SQL statement
Sourcepub fn sql_statement_to_plan_with_context(
&self,
statement: Statement,
planner_context: &mut PlannerContext,
) -> Result<LogicalPlan>
pub fn sql_statement_to_plan_with_context( &self, statement: Statement, planner_context: &mut PlannerContext, ) -> Result<LogicalPlan>
Generate a logical plan from an SQL statement
Auto Trait Implementations§
impl<'a, S> Freeze for SqlToRel<'a, S>
impl<'a, S> RefUnwindSafe for SqlToRel<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for SqlToRel<'a, S>where
S: Sync,
impl<'a, S> Sync for SqlToRel<'a, S>where
S: Sync,
impl<'a, S> Unpin for SqlToRel<'a, S>
impl<'a, S> UnwindSafe for SqlToRel<'a, S>where
S: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more