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

Method get_parameter_names

datafusion/expr/src/logical_plan/plan.rs:1590–1603  ·  view source on GitHub ↗

Walk the logical plan, find any `Placeholder` tokens, and return a set of their names.

(&self)

Source from the content-addressed store, hash-verified

1588
1589 /// Walk the logical plan, find any `Placeholder` tokens, and return a set of their names.
1590 pub fn get_parameter_names(&self) -> Result<HashSet<String>> {
1591 let mut param_names = HashSet::new();
1592 self.apply_with_subqueries(|plan| {
1593 plan.apply_expressions(|expr| {
1594 expr.apply(|expr| {
1595 if let Expr::Placeholder(Placeholder { id, .. }) = expr {
1596 param_names.insert(id.clone());
1597 }
1598 Ok(TreeNodeRecursion::Continue)
1599 })
1600 })
1601 })
1602 .map(|_| param_names)
1603 }
1604
1605 /// Walk the logical plan, find any `Placeholder` tokens, and return a map of their IDs and DataTypes
1606 ///

Callers 1

execute_logical_planMethod · 0.80

Calls 7

newFunction · 0.85
apply_with_subqueriesMethod · 0.80
apply_expressionsMethod · 0.80
mapMethod · 0.45
applyMethod · 0.45
insertMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected