pub fn extract_subqueries(
expr: &Expr,
outer: &TableScope,
catalog: &dyn SqlCatalog,
functions: &FunctionRegistry,
temporal: TemporalScope,
) -> Result<SubqueryExtraction>Expand description
Extract subquery predicates from a WHERE clause.
outer is the scope of the enclosing query, so a correlated reference
inside a subquery resolves against the relation that owns it.
Returns the extracted subquery joins and the remaining WHERE expression
(with subquery predicates removed). If the entire WHERE is a single
subquery predicate, remaining_where is None.