PromQL instant queries and range queries use two independently implemented fetch/merge designs for the same underlying job, not one design expressed twice.
- Instant: one targeted fetch per
values_query (exact-window if Sliding, range if Tumbling), merged once via merge_precomputed_outputs (fold over merge_with, with a do_merge short-circuit when only one bucket is in range).
- Range: one big contiguous fetch over the whole extended range, then a fresh
WindowMerger/NaiveMerger built and fully re-merged from scratch per output step, per key. The trait's incremental slide() (add/remove) is never used.
Binary-expr instant and range queries each just run the corresponding plain-query pipeline once per arm and combine client-side, so this fork is duplicated across all four PromQL query paths, not just the two plain ones.
PromQL instant queries and range queries use two independently implemented fetch/merge designs for the same underlying job, not one design expressed twice.
values_query(exact-window if Sliding, range if Tumbling), merged once viamerge_precomputed_outputs(fold overmerge_with, with ado_mergeshort-circuit when only one bucket is in range).WindowMerger/NaiveMergerbuilt and fully re-merged from scratch per output step, per key. The trait's incrementalslide()(add/remove) is never used.Binary-expr instant and range queries each just run the corresponding plain-query pipeline once per arm and combine client-side, so this fork is duplicated across all four PromQL query paths, not just the two plain ones.