Compute duql window statistics as whole-partition aggregates
DecisionVerified 30 Sep 2026Holds project: dftracer-utils
Decision. The context, the choice, why, and the options that were turned down.
Context#
The duql window block needs var, std, quantile and histogram values.
Decision#
Group rows by partition id, aggregate with group_by, and attach values through the Lookup join. These are whole-partition values, not sliding-frame values.
Why#
The existing window kernel provides sum, min, max, count and mean frames. A sliding quantile or histogram requires an order-statistic structure. Observer inbox 5f2574cd39 records this choice.
Rejected options#
Do not add these as new dftu.frame.window frame kernels merely because running variance can use sums of x and x squared; quantile and histogram need a different data structure.
Also found by searching
- duql window block quantile or histogram: no dftu.frame.window kernel for this function
- I need var, std and quantile in a duql window but only sum, min, max, count and mean frames exist
- how does duql compute quantile and histogram in a window block, sliding or whole partition?
- window statistics computed with group_by plus lookup join, not a sliding order-statistic frame
- duql window block var std quantile histogram, are they sliding frame values?
- how are window statistics like quantile computed in duql, whole partition or moving frame?
- need a sliding quantile over a window in duql, is it supported?
- window var std histogram group_by Lookup join partition id