pub struct SpjNormalForm { /* private fields */ }Expand description
A normalized representation of a plan containing only Select/Project/Join in the relational algebra sense. In DataFusion terminology this also includes Filter nodes. Joins are not currently supported, but are planned.
Implementations§
Source§impl SpjNormalForm
impl SpjNormalForm
Sourcepub fn output_schema(&self) -> &Arc<DFSchema>
pub fn output_schema(&self) -> &Arc<DFSchema>
Schema of data output by this plan.
Sourcepub fn output_exprs(&self) -> &[Expr]
pub fn output_exprs(&self) -> &[Expr]
Expressions output by this plan. These expressions can be used to rewrite this plan as a cross join followed by a projection; however, this does not include any filters in the original plan, so the result will be a superset.
Sourcepub fn referenced_tables(&self) -> &[TableReference]
pub fn referenced_tables(&self) -> &[TableReference]
All tables referenced in this plan.
Sourcepub fn new(original_plan: &LogicalPlan) -> Result<Self>
pub fn new(original_plan: &LogicalPlan) -> Result<Self>
Analyze an existing LogicalPlan and rewrite it in select-project-join normal form.
Sourcepub fn rewrite_from(
&self,
other: &Self,
qualifier: TableReference,
source: Arc<dyn TableSource>,
) -> Result<Option<LogicalPlan>>
pub fn rewrite_from( &self, other: &Self, qualifier: TableReference, source: Arc<dyn TableSource>, ) -> Result<Option<LogicalPlan>>
Rewrite this plan as as selection/projection on top of another plan,
which we use qualifier to refer to.
This is useful for rewriting queries to use materialized views.
Trait Implementations§
Source§impl Clone for SpjNormalForm
impl Clone for SpjNormalForm
Source§fn clone(&self) -> SpjNormalForm
fn clone(&self) -> SpjNormalForm
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SpjNormalForm
impl Debug for SpjNormalForm
Source§impl TreeNodeRewriter for &SpjNormalForm
Rewrite an expression to re-use output columns from this plan, where possible.
impl TreeNodeRewriter for &SpjNormalForm
Rewrite an expression to re-use output columns from this plan, where possible.
Source§fn f_down(&mut self, node: Self::Node) -> Result<Transformed<Self::Node>>
fn f_down(&mut self, node: Self::Node) -> Result<Transformed<Self::Node>>
Source§fn f_up(
&mut self,
node: Self::Node,
) -> Result<Transformed<Self::Node>, DataFusionError>
fn f_up( &mut self, node: Self::Node, ) -> Result<Transformed<Self::Node>, DataFusionError>
Auto Trait Implementations§
impl Freeze for SpjNormalForm
impl !RefUnwindSafe for SpjNormalForm
impl Send for SpjNormalForm
impl Sync for SpjNormalForm
impl Unpin for SpjNormalForm
impl !UnwindSafe for SpjNormalForm
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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