MCPcopy Create free account
hub / github.com/apache/datafusion / create_extension_relation

Method create_extension_relation

datafusion/sql/src/relation/mod.rs:115–143  ·  view source on GitHub ↗
(
        &self,
        relation: TableFactor,
        planner_context: &mut PlannerContext,
    )

Source from the content-addressed store, hash-verified

113 }
114
115 fn create_extension_relation(
116 &self,
117 relation: TableFactor,
118 planner_context: &mut PlannerContext,
119 ) -> Result<RelationPlanning> {
120 let planners = self.context_provider.get_relation_planners();
121 if planners.is_empty() {
122 return Ok(RelationPlanning::Original(Box::new(relation)));
123 }
124
125 let mut current_relation = relation;
126 for planner in planners.iter() {
127 let mut context = SqlToRelRelationContext {
128 planner: self,
129 planner_context,
130 };
131
132 match planner.plan_relation(current_relation, &mut context)? {
133 RelationPlanning::Planned(planned) => {
134 return Ok(RelationPlanning::Planned(planned));
135 }
136 RelationPlanning::Original(original) => {
137 current_relation = *original;
138 }
139 }
140 }
141
142 Ok(RelationPlanning::Original(Box::new(current_relation)))
143 }
144
145 fn create_default_relation(
146 &self,

Callers 1

create_relationMethod · 0.80

Calls 5

newFunction · 0.85
get_relation_plannersMethod · 0.45
is_emptyMethod · 0.45
iterMethod · 0.45
plan_relationMethod · 0.45

Tested by

no test coverage detected