fn apply_existential_subquery(
    id_gen: &mut IdGen,
    outer: MirRelationExpr,
    col_map: &ColumnMap,
    cte_map: &mut BTreeMap<LocalId, CteDesc>,
    config: &Config,
    subquery_expr: HirRelationExpr,
    apply_requires_distinct_outer: bool
) -> Result<MirRelationExpr, PlanError>