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
analytics query: a caller-named measure with an empty prefix (_sum, _avg, …) mints the row wildcard under a non-count aggregate and answers 500 DATABASE_ERROR — the runtime position of #21409's family #21437
Filing gate: ① a defect with a measured reach:, finding class (a): a request shape the public door admits answers a server fault. This is the family close-out card for the runtime half of #21409's family, the row wildcard '*' reaching a non-count aggregate. It covers every caller-named spelling with an enumeration pin, so the next suffix is caught by a test and not filed as a single-point card.
reach:POST /api/v1/analytics/query answers 500 DATABASE_ERROR to {"cube": OBJECT, "measures": ["_sum"]} and to ["_avg"], on both strategies (native SQL and ObjectQL), on an ad-hoc cube and on an authored cube that does not declare the member. The controls amount_sum (ad-hoc) and amount_total (authored) answer 200 with the true sum, 1400. A statement reached the engine on every 500 cell (rawSql+1 native, aggregate+1 ObjectQL). This was measured on the runtime dispatcher's door harness (packages/runtime/src/analytics-json-dimension-door.test.ts's composition, SQLite) by the #21409 dev, os-dev-report 5956509330, probe. The probe file was throwaway and never committed.
Filed by the domain:spec seat 1 (session_01UtnxvdiN376GF3sgXwAw4d, seat post #6017), from the at-tier review of PR #21431 (record 5956317829 ③, which read it from code) and the measurement above. ⛔ Filed bare: routing and grading are triage's. ⛔ Not a claim.
The mechanism (read at main)
packages/services/service-analytics/src/analytics-service.ts, inferMeasure: for a key ending in a suffix, the source is key.slice(0, -suffix.length) || '*'. An empty prefix therefore mints { type: SUFFIX_AGGREGATE, sql: '*' }.
assertCallerMembersResolvable, the caller-measure gate: it passes inferredSql === '*' as a column reference under any aggregate. The count arm is not distinguished.
The strategies emit the operand verbatim, so the database receives SUM(*) / AVG(*).
The documented contract is narrower than the runtime. content/docs/api/data-api.mdx ("How to spell a measure") names the inferred spellings as the bare count, or "one of the object's own field names plus an aggregation suffix". An empty prefix is no field name.
Enumeration pin (for triage, not a ruling): every suffix inferMeasure strips, with an empty prefix, at the door, on both strategies, ad-hoc and authored. The suffixes are _sum, _avg, _average, _min, _max and _count_distinct; the last four were not measured, but they come from the same mint. The bare count stays COUNT(*) as the control. A new suffix is then caught by the pin.
Direction (for triage, not a ruling)
The empty prefix is refused at the door as a 400, naming the spelling sent, the way the door already refuses a measure naming a missing field. It is not minted into '*'. ⛔ No strategy-side tolerance: the strategies keep emitting what the gate admits.
Whether the fix belongs in inferMeasure (no '*' fallback) or in the gate ('*' passes only for count) is the implementer's call. One rule, not two.
Serial: analytics-service.ts is shared with in-flight domain:services work; read the live claims at dispatch.
Dedupe
mcp__github__search_issues, repo-scoped, open and closed:
Filing gate: ① a defect with a measured
reach:, finding class (a): a request shape the public door admits answers a server fault. This is the family close-out card for the runtime half of #21409's family, the row wildcard'*'reaching a non-countaggregate. It covers every caller-named spelling with an enumeration pin, so the next suffix is caught by a test and not filed as a single-point card.reach:POST /api/v1/analytics/queryanswers 500DATABASE_ERRORto{"cube": OBJECT, "measures": ["_sum"]}and to["_avg"], on both strategies (native SQL and ObjectQL), on an ad-hoc cube and on an authored cube that does not declare the member. The controlsamount_sum(ad-hoc) andamount_total(authored) answer 200 with the true sum, 1400. A statement reached the engine on every 500 cell (rawSql+1native,aggregate+1ObjectQL). This was measured on the runtime dispatcher's door harness (packages/runtime/src/analytics-json-dimension-door.test.ts's composition, SQLite) by the #21409 dev, os-dev-report5956509330,probe. The probe file was throwaway and never committed.Filed by the
domain:specseat 1 (session_01UtnxvdiN376GF3sgXwAw4d, seat post #6017), from the at-tier review of PR #21431 (record5956317829③, which read it from code) and the measurement above. ⛔ Filed bare: routing and grading are triage's. ⛔ Not a claim.The mechanism (read at
main)packages/services/service-analytics/src/analytics-service.ts,inferMeasure: for a key ending in a suffix, the source iskey.slice(0, -suffix.length) || '*'. An empty prefix therefore mints{ type: SUFFIX_AGGREGATE, sql: '*' }.assertCallerMembersResolvable, the caller-measure gate: it passesinferredSql === '*'as a column reference under any aggregate. Thecountarm is not distinguished.SUM(*)/AVG(*).content/docs/api/data-api.mdx("How to spell a measure") names the inferred spellings as the barecount, or "one of the object's own field names plus an aggregation suffix". An empty prefix is no field name.The family
'*'runs only undercount, but a cube measure's or dimension'ssqland a dataset measure'sfieldadmit it under any aggregate — a summed'*'answers 500 at the dataset door (split from #21000) #21409 (PR feat(spec)!: the analytics row wildcard '*' is admitted only where a count consumes it (#21409) #21431, in review): the authored positions, refused at parse. They are a cube measure'ssqland a dataset measure'sfieldunder a non-countaggregate, and a cube dimension'ssql.'*'runs only undercount, but a cube measure's or dimension'ssqland a dataset measure'sfieldadmit it under any aggregate — a summed'*'answers 500 at the dataset door (split from #21000) #21409's refusal does not reach it, because neither mint site parses throughCubeSchema.inferMeasurestrips, with an empty prefix, at the door, on both strategies, ad-hoc and authored. The suffixes are_sum,_avg,_average,_min,_maxand_count_distinct; the last four were not measured, but they come from the same mint. The barecountstaysCOUNT(*)as the control. A new suffix is then caught by the pin.Direction (for triage, not a ruling)
400, naming the spelling sent, the way the door already refuses a measure naming a missing field. It is not minted into'*'. ⛔ No strategy-side tolerance: the strategies keep emitting what the gate admits.inferMeasure(no'*'fallback) or in the gate ('*'passes only forcount) is the implementer's call. One rule, not two.analytics-service.tsis shared with in-flightdomain:serviceswork; read the live claims at dispatch.Dedupe
mcp__github__search_issues, repo-scoped, open and closed:'*'runs only undercount, but a cube measure's or dimension'ssqland a dataset measure'sfieldadmit it under any aggregate — a summed'*'answers 500 at the dataset door (split from #21000) #21409 is the authored positions. analytics: a measure naming a missing field 500s with SQLITE_ERROR instead of a 400 naming the field #4437 and [17.0-rc2验收] analytics: 不存在的 dimension 500(泄漏 SQL / SQLITE_ERROR)而不是 400 指名字段 —— #4437 只给 measure 加了闸门,dimension 侧对称缺口仍在 #5520 (closed) are a measure / dimension naming a missing field. None is an empty prefix.None covers a caller-named measure minting
'*'.Dedupe words:
inferMeasure empty prefix·caller-named measure _sum SUM(*) 500·row wildcard non-count aggregate runtime mint