pub async fn execute_lateral_loop<S: StorageEngine>(
engine: &LiteQueryEngine<S>,
outer_plan: &PhysicalPlan,
spec: LateralLoopSpec<'_>,
) -> Result<QueryResult, LiteError>Expand description
LATERAL nested-loop with correlated predicates injected per outer row.
Runs outer_plan once to materialise outer rows, caps them at
outer_row_cap (0 = uncapped), then for each outer row builds equality
filters from correlation_predicates and scans inner_collection.
Emits every matching inner row merged with the outer row. Supports LEFT
join semantics.