Skip to content

[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

Description

@objectstack-fleet

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 500 DATABASE_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.

Scope for whoever takes it (⛔ not a ruling)

Dedupe

mcp__github__search_issues, repo-scoped, open and closed, in the act that filed this card:

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 500


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:reportsBusiness reporting — dashboards, reports, the numbers a manager readsbugSomething isn't workingdomain:servicespriority:p2Medium: important, M3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions