[−][src]Trait datafusion::logical_plan::UserDefinedLogicalNode
This defines the interface for LogicalPlan
nodes that can be
used to extend DataFusion with custom relational operators.
See the example in user_defined_plan.rs for an example of how to use this extension API
Required methods
fn as_any(&self) -> &dyn Any
[src]
Return a reference to self as Any, to support dynamic downcasting
fn inputs(&self) -> Vec<&LogicalPlan>
[src]
Return the logical plan's inputs
fn schema(&self) -> &DFSchemaRef
[src]
Return the output schema of this logical plan node
fn expressions(&self) -> Vec<Expr>
[src]
returns all expressions in the current logical plan node. This should not include expressions of any inputs (aka non-recursively) These expressions are used for optimizer passes and rewrites.
fn fmt_for_explain(&self, f: &mut Formatter<'_>) -> Result
[src]
Write a single line, human readable string to f
for use in explain plan
For example: TopK: k=10
fn from_template(
&self,
exprs: &Vec<Expr>,
inputs: &Vec<LogicalPlan>
) -> Arc<dyn UserDefinedLogicalNode + Send + Sync>
[src]
&self,
exprs: &Vec<Expr>,
inputs: &Vec<LogicalPlan>
) -> Arc<dyn UserDefinedLogicalNode + Send + Sync>
Create a new ExtensionPlanNode
with the specified children
and expressions. This function is used during optimization
when the plan is being rewritten and a new instance of the
ExtensionPlanNode
must be created.
Note that exprs and inputs are in the same order as the result of self.inputs and self.exprs.
So, `self.from_template(exprs, ..).expressions() == exprs
Provided methods
fn prevent_predicate_push_down_columns(&self) -> HashSet<String>
[src]
A list of output columns (e.g. the names of columns in self.schema()) for which predicates can not be pushed below this node without changing the output.
By default, this returns all columns and thus prevents any predicates from being pushed below this node.