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

Method transform_data

datafusion/common/src/tree_node.rs:711–719  ·  view source on GitHub ↗

Applies a fallible transforming `f` to the data of this [`Transformed`] object. The returned `Transformed` object has the `transformed` flag set if either `self` or the return value of `f` have the `transformed` flag set.

(
        self,
        f: F,
    )

Source from the content-addressed store, hash-verified

709 /// The returned `Transformed` object has the `transformed` flag set if either
710 /// `self` or the return value of `f` have the `transformed` flag set.
711 pub fn transform_data<U, F: FnOnce(T) -> Result<Transformed<U>>>(
712 self,
713 f: F,
714 ) -> Result<Transformed<U>> {
715 f(self.data).map(|mut t| {
716 t.transformed |= self.transformed;
717 t
718 })
719 }
720
721 /// Maps the [`Transformed`] object to the result of the given `f` depending on the
722 /// current [`TreeNodeRecursion`] value and the fact that `f` is changing the current

Callers 11

simplifyMethod · 0.80
rewriteMethod · 0.80
try_optimize_windowMethod · 0.80
try_unary_planMethod · 0.80
optimize_projectionsFunction · 0.80
rewrite_planMethod · 0.80
analyze_internalFunction · 0.80
optimize_internalMethod · 0.80

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected