pub trait RelationPlanner:
Debug
+ Send
+ Sync {
// Required method
fn plan_relation(
&self,
relation: TableFactor,
context: &mut dyn RelationPlannerContext,
) -> Result<RelationPlanning>;
}Available on crate feature
sql only.Expand description
Customize planning SQL table factors to LogicalPlans.
For more background, please also see the Extending SQL in DataFusion: from ->> to TABLESAMPLE blog
Required Methods§
Sourcefn plan_relation(
&self,
relation: TableFactor,
context: &mut dyn RelationPlannerContext,
) -> Result<RelationPlanning>
fn plan_relation( &self, relation: TableFactor, context: &mut dyn RelationPlannerContext, ) -> Result<RelationPlanning>
Plan a table factor into a LogicalPlan.
Returning RelationPlanning::Planned short-circuits further planning and uses the
provided plan. Returning RelationPlanning::Original allows the next registered planner,
or DataFusion’s default logic, to handle the relation.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".