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

Function has_work_table_reference

datafusion/sql/src/cte.rs:187–204  ·  view source on GitHub ↗
(
    plan: &LogicalPlan,
    work_table_source: &Arc<dyn TableSource>,
)

Source from the content-addressed store, hash-verified

185}
186
187fn has_work_table_reference(
188 plan: &LogicalPlan,
189 work_table_source: &Arc<dyn TableSource>,
190) -> bool {
191 let mut has_reference = false;
192 plan.apply(|node| {
193 if let LogicalPlan::TableScan(scan) = node
194 && Arc::ptr_eq(&scan.source, work_table_source)
195 {
196 has_reference = true;
197 return Ok(TreeNodeRecursion::Stop);
198 }
199 Ok(TreeNodeRecursion::Continue)
200 })
201 // Closure always return Ok
202 .unwrap();
203 has_reference
204}

Callers 1

recursive_cteMethod · 0.85

Calls 1

applyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…