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

Method transform_up

datafusion/common/src/tree_node.rs:255–269  ·  view source on GitHub ↗

Recursively rewrite the node using `f` in a bottom-up (post-order) fashion. `f` is applied to the node's children first, and then to the node itself. # See Also [`Self::transform_down`] top-down (pre-order) traversal. [Self::transform_down_up] for a combined traversal with closures [`Self::rewrite`] for a combined traversal with a visitor

(
        self,
        mut f: F,
    )

Source from the content-addressed store, hash-verified

253 /// * [Self::transform_down_up] for a combined traversal with closures
254 /// * [`Self::rewrite`] for a combined traversal with a visitor
255 fn transform_up<F: FnMut(Self) -> Result<Transformed<Self>>>(
256 self,
257 mut f: F,
258 ) -> Result<Transformed<Self>> {
259 #[cfg_attr(feature = "recursive_protection", recursive::recursive)]
260 fn transform_up_impl<N: TreeNode, F: FnMut(N) -> Result<Transformed<N>>>(
261 node: N,
262 f: &mut F,
263 ) -> Result<Transformed<N>> {
264 node.map_children(|c| transform_up_impl(c, f))?
265 .transform_parent(f)
266 }
267
268 transform_up_impl(self, &mut f)
269 }
270
271 /// Transforms the node using `f_down` while traversing the tree top-down
272 /// (pre-order), and using `f_up` while traversing the tree bottom-up

Callers 15

rewrite_exprMethod · 0.80
update_exprFunction · 0.80
project_orderingFunction · 0.80
build_dagFunction · 0.80
remap_childrenMethod · 0.80
with_new_schemaFunction · 0.80
get_expr_propertiesMethod · 0.80
resolve_columnsFunction · 0.80
resolve_aliases_to_exprsFunction · 0.80
normalize_union_schemaFunction · 0.80

Implementers 3

tree_node.rsdatafusion/expr/src/tree_node.rs
tree_node.rsdatafusion/expr/src/logical_plan/tree_
tree_node.rsdatafusion/common/src/tree_node.rs

Calls

no outgoing calls

Tested by 4

runMethod · 0.64
try_to_planMethod · 0.64
check_integrityFunction · 0.64
execute_planMethod · 0.64