Rindle docs and package mapSkip to main content

resolve_scalars

Function resolve_scalars 

Source
pub fn resolve_scalars(
    ast: &Ast,
    catalog: &dyn ScalarCatalog,
) -> Result<Ast, BuildError>
Expand description

Resolve every scalar-flagged correlated subquery in ast (its WHERE tree and, recursively, every nested subquery and related child) against catalog, returning a rewritten AST in which each fold has replaced its EXISTS/NOT EXISTS condition with a plain Simple condition (so the builder emits no join for it). Conditions without the flag are untouched, so an AST with no scalar: true anywhere round-trips unchanged.

Errors (design ยง7: a flagged scalar that cannot be proven single-row is loud, not a silent live fallback):