pub fn collect_subquery_join_exprs(
exprs: &[Expr],
subquery_schema: &DFSchema,
) -> Result<Vec<Expr>>Expand description
Determine the subquery-side expressions a join filter compares, stopping at the first subquery-referencing sub-expression rather than descending to the bare columns inside of it.
t1.a = t2.b yields t2.b, matching collect_subquery_cols. But
t1.a = CAST(t2.b AS INT) yields CAST(t2.b AS INT) whole, not t2.b.
The two differ whenever the correlated predicate wraps the subqueryâs
column in an expression, in which case we need to evaluate the full
expression before grouping, so that two column values which compare
equal after the wrapping expression end up in the same group.