Similarly to [`Self::apply`], calls `f` on this node and all its inputs, including subqueries that may appear in expressions such as `IN (SELECT ...)`.
(
&self,
mut f: F,
)
| 710 | /// including subqueries that may appear in expressions such as `IN (SELECT |
| 711 | /// ...)`. |
| 712 | pub fn apply_with_subqueries<F: FnMut(&Self) -> Result<TreeNodeRecursion>>( |
| 713 | &self, |
| 714 | mut f: F, |
| 715 | ) -> Result<TreeNodeRecursion> { |
| 716 | #[cfg_attr(feature = "recursive_protection", recursive::recursive)] |
| 717 | fn apply_with_subqueries_impl< |
| 718 | F: FnMut(&LogicalPlan) -> Result<TreeNodeRecursion>, |
| 719 | >( |
| 720 | node: &LogicalPlan, |
| 721 | f: &mut F, |
| 722 | ) -> Result<TreeNodeRecursion> { |
| 723 | f(node)?.visit_children(|| { |
| 724 | node.apply_subqueries(|c| apply_with_subqueries_impl(c, f))? |
| 725 | .visit_sibling(|| { |
| 726 | node.apply_children(|c| apply_with_subqueries_impl(c, f)) |
| 727 | }) |
| 728 | }) |
| 729 | } |
| 730 | |
| 731 | apply_with_subqueries_impl(self, &mut f) |
| 732 | } |
| 733 | |
| 734 | /// Similarly to [`Self::transform`], rewrites this node and its inputs using `f`, |
| 735 | /// including subqueries that may appear in expressions such as `IN (SELECT |
no outgoing calls