pub fn plan_lateral_join(
outer_plan: SqlPlan,
outer_alias: Option<String>,
subquery: &Query,
lateral_alias: &str,
left_join: bool,
outer_projection: Vec<Projection>,
catalog: &dyn SqlCatalog,
functions: &FunctionRegistry,
temporal: TemporalScope,
) -> Result<SqlPlan>Expand description
Plan a LATERAL subquery join.
Called when the right side of a JOIN (or a comma-separated FROM item) is a
TableFactor::Derived { lateral: true, .. }.
outer_plan — plan for the driving (outer) side.
outer_alias — alias or name of the outer table for correlation detection.
subquery — the LATERAL inner subquery.
lateral_alias — alias given to the LATERAL in the SQL (e.g. x in LATERAL (...) x).
left_join — true when the enclosing join is LEFT JOIN LATERAL (outer rows
preserved when inner produces no rows).
outer_projection — SELECT list projection to apply after the lateral.