:hide-zero t on rollup types
Type-level opt-in that drops grain rows whose measures are empty after aggregation. MVP keeps every grain row (zero-fact retention, Issue 8). Leaderboards and plan 12's dead-models path (same rollup, sort ASC) need those zeros.
Not a default flip: adding the flag later is additive; turning it on by default would be a breaking change.
When set:
- Measure Phase A appends
HAVING(typicallyCOUNT(<fact>.id) FILTER (...) > 0). SUM/COUNT of no facts is 0; AVG is NULL. "Zero" is not one predicate; pick the gate (usually the:count). :totalmust count only remaining rows. Today'sSELECT COUNT(*) FROM <grain>becomes a lie. Spec seam is plan 08b Step 5.
Do not open a general HAVING DSL (thresholds, OR, "hide if all measures empty"). One boolean.
:hide-zero on a non-rollup is a compile error. Absent is legal (today's behavior).
- Slot
- 15800
- Status
- 10 Open
- Tags
- backend, compiler
- Contributors
- Donnie