You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(service-analytics): a window-only timeDimensions entry no longer buckets the grid (#5688)
A `timeDimensions` entry carrying only a `dateRange` — a dashboard date-range
filter, with the dimension absent from `selection.dimensions` — had the dataset
dimension's declared `dateGranularity` filled in, which made it a GROUP BY item:
the response grew a time column nobody selected and rows split per bucket, so
"count by Owner" plus a date filter came back as "by Owner x month".
Narrow the backfill: an entry that states no `granularity` gets one only when
the request says that date is being bucketed — the dimension is a grid dimension
of this query, or `selection.dateGranularity` is set. An entry carrying its own
granularity is unaffected and stays projected (#4033).
compareTo alignment (#3588/#4870) holds by construction: the comparison pass
re-enters `buildQuery` with the same grid dimensions, so both passes bucket an
entry alike or not at all. For a window-only anchor this repairs the comparison
— the merge keys on `dimensions` alone, so the backfilled bucket column sat
outside the key and the comparison value landed on whichever split row the index
held last. Pinned as a pair, both verdicts, both passes.
Also closes the same-root-cause label blind spot: a time column projected via
`timeDimensions` now carries its dataset `label` in `fields`. The enrichment
lookup widens; the projection does not, so a window-only entry still mints no
descriptor.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015a5qkLzpGXhLL2F5gvJ7dD
0 commit comments