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
[finding] analytics NativeSQL answers a multi-value dimension one group per serialized array on SQLite and 500 on PostgreSQL, and a count_distinct over a JSON-stored field 2 / 500; the engine door #20808 adds does not see it #20912
Filing gate: ① a defect with a named landing site: packages/services/service-analytics, beside structured-json-dimension-door.ts (#20807's door). Finding class (a). reach:AnalyticsService.query / queryDataset, wired with AnalyticsServicePlugin's own bridges, which POST /api/v1/analytics/query and /api/v1/analytics/dataset/query relay verbatim.
The measurement is #20808's dev's, at the service (not over HTTP), at 42d78b97f and after merging 00a92e18d (#20807's door), on SQLite and a live PostgreSQL 16.13 (os-dev-report 5916514958 on #20808, out_of_scope_findings[0]).
Filed by the domain:engine execution seat 1 (session_01DEvba2nBuD4tWzfq8r8NFY, os-support-ai). ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.
What happens
PR #20911 (#20808) refuses both shapes at the engine aggregate door with INVALID_FIELD / 400: a groupBy on a multi-value field, and count_distinct over a JSON-stored field. The analytics ObjectQL strategy reaches that door and answers the 400. The NativeSQL strategy compiles its own SQL on SQL drivers and bypasses the door:
analytics query
SQLite
PostgreSQL 16
a cube or dataset dimension on a multi-value field (a multiple: true select or lookup, tags, …)
one group per serialized array
500DATABASE_ERROR
an inferred cube measure FIELD_count_distinct over a JSON-stored field
2
500
a dataset measure count_distinct over a select with multiple: true (the compatibility table sees only the type select)
200
500
A dataset measure count_distinct over a JSON-stored type is already refused DATASET_INVALID on every driver, by the table row #20808 narrows.
Filing gate: ① a defect with a named landing site:
packages/services/service-analytics, besidestructured-json-dimension-door.ts(#20807's door). Finding class (a).reach:AnalyticsService.query/queryDataset, wired withAnalyticsServicePlugin's own bridges, whichPOST /api/v1/analytics/queryand/api/v1/analytics/dataset/queryrelay verbatim.The measurement is #20808's dev's, at the service (not over HTTP), at
42d78b97fand after merging00a92e18d(#20807's door), on SQLite and a live PostgreSQL 16.13 (os-dev-report5916514958 on #20808,out_of_scope_findings[0]).Filed by the
domain:engineexecution seat 1 (session_01DEvba2nBuD4tWzfq8r8NFY,os-support-ai). ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.What happens
PR #20911 (#20808) refuses both shapes at the engine aggregate door with
INVALID_FIELD/ 400: agroupByon a multi-value field, andcount_distinctover a JSON-stored field. The analytics ObjectQL strategy reaches that door and answers the 400. The NativeSQL strategy compiles its own SQL on SQL drivers and bypasses the door:multiple: trueselect or lookup,tags, …)DATABASE_ERRORFIELD_count_distinctover a JSON-stored fieldcount_distinctover a select withmultiple: true(the compatibility table sees only the typeselect)A dataset measure
count_distinctover a JSON-stored type is already refusedDATASET_INVALIDon every driver, by the table row #20808 narrows.Scope for whoever takes it (⛔ not a ruling)
isMultiValueFieldand the table'scount_distinctrow, beside [finding] analytics: a cube / dataset dimension on ajsonfield, compiled by NativeSQLStrategy, answers one group per serialized document on SQLite and 500 on PostgreSQL; the engine door #20783 closes does not see it #20807's structured-JSON dimension door.multiple: true), not only the type.groupByon amultiple: trueselect, andcount_distincton ajsonfield #20808 dev also noted that a refusal relayed through the ObjectQL strategy names the engine's position (groupBy[0]), not the cube member the caller wrote. It is fair to fold that in.Dedupe
mcp__github__search_issues, repo-scoped, open and closed, in the act that filed this card:jsonfield, compiled by NativeSQLStrategy, answers one group per serialized document on SQLite and 500 on PostgreSQL; the engine door #20783 closes does not see it #20807 (closed) is thejsondimension, the structured-JSON half this card extends.numberas a string (count: "2"), where SQLite answers 2 — the class #20335 closed at the engine door #20889 (open) is a numeric string on PostgreSQL. [finding]os validatepasses a dataset dimension over a structured-JSON field that the analytics runtime refuses 400 INVALID_FIELD — only the measure has an authoring-time leg #20890 (open) isos validatefor a structured-JSON dimension.groupByon amultiple: trueselect, andcount_distincton ajsonfield #20808 (open, in flight) is the engine door. [finding]groupByon ajsonfield answers 500DATABASE_ERRORon PostgreSQL, one merged group on memory, and one group per serialized value on SQLite #20783, driver-sql on PostgreSQL: the nativeaggregatereturnscount/sum/avgas strings ("n":"1","total":"20.000…"), sohaving { n: { $in: [2] } }keeps no group on PostgreSQL alone, where memory, SQLite and PG's rows path keep c1, c2 #20335, service-analytics: the NativeSQL read-scope compiler and the/analytics/sqlecho compile two scope shapes the shared comparand faces refuse (plain-object comparand under$eq, null member in$in): one scope, two answers across faces #20018 and [spec/drivers]AggregationNode.distinctis honoured by the in-memory fallback and ignored by every SQL face — one query, two numbers (ADR-0049) #6815 are closed neighbours.count_distincton the NativeSQL path.Dedupe words:
analytics native sql dimension multi-value field postgres 500·cube measure count_distinct json field native sql·dataset measure count_distinct multiple select postgres 500Generated by Claude Code