Reusable selections and composite-key filters need tabular scopes that v0.2.1 does not model.
$selected = (SELECT id, label FROM records WHERE active = true);
SELECT id FROM $selected;
Deliver in steps: noncorrelated scalar IN subqueries; tuple-valued keys and IN; derived FROM/JOIN sources; named SELECT bindings; then AGGREGATE_LIST and the concrete JSON serialization path for projecting grouped lists.
Acceptance: resolve source/result names once using direct parser contexts; preserve alias scope and nullability; reject ambiguous names and unsupported correlations explicitly; support these sources in read queries and the applicable DML forms. Test NULL and empty inputs, tuple arity/types, alias shadowing, grouping and computed projections. Do not diagnose an IN subquery as a parenthesized List parameter or suggest a rewrite that changes its meaning.
Priority: after shared expression improvements. No intermediate AST or separate generator-specific analysis.
Reusable selections and composite-key filters need tabular scopes that v0.2.1 does not model.
Deliver in steps: noncorrelated scalar IN subqueries; tuple-valued keys and IN; derived FROM/JOIN sources; named SELECT bindings; then AGGREGATE_LIST and the concrete JSON serialization path for projecting grouped lists.
Acceptance: resolve source/result names once using direct parser contexts; preserve alias scope and nullability; reject ambiguous names and unsupported correlations explicitly; support these sources in read queries and the applicable DML forms. Test NULL and empty inputs, tuple arity/types, alias shadowing, grouping and computed projections. Do not diagnose an IN subquery as a parenthesized List parameter or suggest a rewrite that changes its meaning.
Priority: after shared expression improvements. No intermediate AST or separate generator-specific analysis.