Similarly to [`Self::apply`], calls `f` on this node and its inputs, including subqueries that may appear in expressions such as `IN (SELECT ...)`.
(
&self,
mut f: F,
)
| 824 | /// including subqueries that may appear in expressions such as `IN (SELECT |
| 825 | /// ...)`. |
| 826 | pub fn apply_subqueries<F: FnMut(&Self) -> Result<TreeNodeRecursion>>( |
| 827 | &self, |
| 828 | mut f: F, |
| 829 | ) -> Result<TreeNodeRecursion> { |
| 830 | self.apply_expressions(|expr| { |
| 831 | expr.apply(|expr| match expr { |
| 832 | Expr::Exists(Exists { subquery, .. }) |
| 833 | | Expr::InSubquery(InSubquery { subquery, .. }) |
| 834 | | Expr::SetComparison(SetComparison { subquery, .. }) |
| 835 | | Expr::ScalarSubquery(subquery) => { |
| 836 | // Wrap in LogicalPlan::Subquery to match f's signature |
| 837 | f(&LogicalPlan::Subquery(subquery.clone())) |
| 838 | } |
| 839 | _ => Ok(TreeNodeRecursion::Continue), |
| 840 | }) |
| 841 | }) |
| 842 | } |
| 843 | |
| 844 | /// Similarly to [`Self::map_children`], rewrites all subqueries that may |
| 845 | /// appear in expressions such as `IN (SELECT ...)` using `f`. |
no test coverage detected