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

Function empty_child

datafusion/optimizer/src/propagate_empty_relation.rs:254–271  ·  view source on GitHub ↗
(plan: &LogicalPlan)

Source from the content-addressed store, hash-verified

252}
253
254fn empty_child(plan: &LogicalPlan) -> Result<Option<LogicalPlan>> {
255 match plan.inputs()[..] {
256 [child] => match child {
257 LogicalPlan::EmptyRelation(empty) => {
258 if !empty.produce_one_row {
259 Ok(Some(LogicalPlan::EmptyRelation(EmptyRelation {
260 produce_one_row: false,
261 schema: Arc::clone(plan.schema()),
262 })))
263 } else {
264 Ok(None)
265 }
266 }
267 _ => Ok(None),
268 },
269 _ => plan_err!("plan just can have one child"),
270 }
271}
272
273/// Builds a Projection that replaces one side of an outer join with NULL literals.
274///

Callers 1

rewriteMethod · 0.85

Calls 3

EmptyRelationClass · 0.85
inputsMethod · 0.45
schemaMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…