Commit 112a8c6
`ObjectQLStrategy.execute` built its engine filter from
`normalizeAnalyticsFilterTree(query)` alone — the caller's `where` and the time
windows — and consulted the dataset registry nowhere. On a deployment whose
driver reports `objectqlAggregate` but not `nativeSql`, `engine.aggregate` was
therefore called with no `filter` key at all: the dataset's definition-level
scope was dropped and every measure aggregated the whole table, while the
dashboard door answered the scoped numbers for the same cube.
The scope now travels as its own `$and` conjunct — never a key merge, for the
reason `withReadScope` states: the caller's `where` and the dataset scope can
name the same field. The representative SQL echo renders it as well, on the
#3601/#3602 rule that an echo omitting an applied predicate is the same lie as
one inventing a predicate.
Phase 1 only: per-measure filters cannot be expressed against an aggregation
typed `{ field, method, alias }`. That contract widening is #10576 and the
lowering is phase 2 — pinned open, wrong numbers and all, in
`objectql-dataset-filter.test.ts`.
Part of #10413
Claude-Session: https://claude.ai/code/session_01PnJHU45vPJj5UQrxe946Bx
Co-authored-by: Claude <noreply@anthropic.com>
1 parent b05a543 commit 112a8c6
3 files changed
Lines changed: 480 additions & 1 deletion
File tree
- .changeset
- packages/services/service-analytics/src
- __tests__
- strategies
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments