Applies `f` to each child (input) of this plan node, rewriting them *in place. # Notes Inputs include ONLY direct children, not embedded `LogicalPlan`s for subqueries, for example such as are in [`Expr::Exists`]. [`Expr::Exists`]: crate::Expr::Exists
(
self,
f: F,
)
| 70 | /// |
| 71 | /// [`Expr::Exists`]: crate::Expr::Exists |
| 72 | fn map_children<F: FnMut(Self) -> Result<Transformed<Self>>>( |
| 73 | self, |
| 74 | f: F, |
| 75 | ) -> Result<Transformed<Self>> { |
| 76 | Ok(match self { |
| 77 | LogicalPlan::Projection(Projection { |
| 78 | expr, |
| 79 | input, |
| 80 | schema, |
| 81 | }) => input.map_elements(f)?.update_data(|input| { |
| 82 | LogicalPlan::Projection(Projection { |
| 83 | expr, |
| 84 | input, |
| 85 | schema, |
| 86 | }) |
| 87 | }), |
| 88 | LogicalPlan::Filter(Filter { predicate, input }) => input |
| 89 | .map_elements(f)? |
| 90 | .update_data(|input| LogicalPlan::Filter(Filter { predicate, input })), |
| 91 | LogicalPlan::Repartition(Repartition { |
| 92 | input, |
| 93 | partitioning_scheme, |
| 94 | }) => input.map_elements(f)?.update_data(|input| { |
| 95 | LogicalPlan::Repartition(Repartition { |
| 96 | input, |
| 97 | partitioning_scheme, |
| 98 | }) |
| 99 | }), |
| 100 | LogicalPlan::Window(Window { |
| 101 | input, |
| 102 | window_expr, |
| 103 | schema, |
| 104 | }) => input.map_elements(f)?.update_data(|input| { |
| 105 | LogicalPlan::Window(Window { |
| 106 | input, |
| 107 | window_expr, |
| 108 | schema, |
| 109 | }) |
| 110 | }), |
| 111 | LogicalPlan::Aggregate(Aggregate { |
| 112 | input, |
| 113 | group_expr, |
| 114 | aggr_expr, |
| 115 | schema, |
| 116 | }) => input.map_elements(f)?.update_data(|input| { |
| 117 | LogicalPlan::Aggregate(Aggregate { |
| 118 | input, |
| 119 | group_expr, |
| 120 | aggr_expr, |
| 121 | schema, |
| 122 | }) |
| 123 | }), |
| 124 | LogicalPlan::Sort(Sort { expr, input, fetch }) => input |
| 125 | .map_elements(f)? |
| 126 | .update_data(|input| LogicalPlan::Sort(Sort { expr, input, fetch })), |
| 127 | LogicalPlan::Join(Join { |
| 128 | left, |
| 129 | right, |
no test coverage detected