Closed-pipeline scan narrowing requires indexed named fields
FactVerified 30 Sep 2026Holds project: dftracer-utils
Fact. A statement and the evidence for it.
Statement#
A duql pipeline ending in group, agg, select, pivot or keyed distinct can narrow its scan to named fields only when all named fields are in the index and no bare distinct comes first. Preserve the wider scan when those conditions do not hold.
Evidence#
Transcript b1cb9c733a reports that narrowing broke resolution of args.system, which was absent from the fixture's index. Disabling narrowing restored compilation. The final change states both guards and reports duql and View tests passed, with explain output showing narrower reads where valid.
Also found by searching
- duql compile fails resolving args.system after a pipeline ending in group narrowed the scan
- a query ending with group or select breaks when a field it names is not in the index
- when can duql narrow the scan to only the named fields in a closed pipeline?
- scan projection pushdown requires indexed fields and no bare distinct first, explain shows narrower reads
- resolution of args.system fails after scan narrowing in duql pipeline ending in group or agg
- compile error unknown field when pipeline closed with select pivot and field not in index
- when does duql narrow the scan to named fields only?
- narrowing broke args.system lookup, fixture index lacks that field, bare distinct first