pub struct Planner { /* private fields */ }Implementations§
Source§impl Planner
impl Planner
pub fn new(schema: SchemaRef) -> Self
Sourcepub fn with_enable_relations(self, enable_relations: bool) -> Self
pub fn with_enable_relations(self, enable_relations: bool) -> Self
If passed with true, then the first identifier in column reference
is parsed as the relation. For example, table.field.inner will be
read as the nested field field.inner (inner on struct field field)
on the table relation. If false (the default), then no relations
are used and all identifiers are assumed to be a nested column path.
Sourcepub fn parse_filter(&self, filter: &str) -> Result<Expr>
pub fn parse_filter(&self, filter: &str) -> Result<Expr>
Create Logical Expr from a SQL filter clause.
Note: the returned expression must be passed through [optimize_expr()] before being passed to [create_physical_expr()].
Sourcepub fn parse_expr(&self, expr: &str) -> Result<Expr>
pub fn parse_expr(&self, expr: &str) -> Result<Expr>
Create Logical Expr from a SQL expression.
Note: the returned expression must be passed through [optimize_filter()] before being passed to [create_physical_expr()].
Sourcepub fn optimize_expr(&self, expr: Expr) -> Result<Expr>
pub fn optimize_expr(&self, expr: Expr) -> Result<Expr>
Optimize the filter expression and coerce data types.
Sourcepub fn create_physical_expr(&self, expr: &Expr) -> Result<Arc<dyn PhysicalExpr>>
pub fn create_physical_expr(&self, expr: &Expr) -> Result<Arc<dyn PhysicalExpr>>
Create the PhysicalExpr from a logical Expr
Sourcepub fn column_names_in_expr(expr: &Expr) -> Vec<String>
pub fn column_names_in_expr(expr: &Expr) -> Vec<String>
Collect the columns in the expression.
The columns are returned in sorted order.
If the expr refers to nested columns these will be returned as dotted paths (x.y.z)
Auto Trait Implementations§
impl Freeze for Planner
impl !RefUnwindSafe for Planner
impl Send for Planner
impl Sync for Planner
impl Unpin for Planner
impl !UnwindSafe for Planner
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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