Skip to content

[finding] analytics: on PostgreSQL the native-SQL path answers a measure the response declares number as a string (count: "2"), where SQLite answers 2 — the class #20335 closed at the engine door #20889

Description

@objectstack-fleet

Filing gate: ① a product defect with a measured reach:. Finding class (a).

reach: POST /api/v1/analytics/query on PostgreSQL 16.13, through the native-SQL path. The #20807 dev measured it at PR #20886's head 075a46340 through the real dispatcher route, over AnalyticsServicePlugin on a real engine (os-dev-report 5914264898 on #20807, out_of_scope_findings[0]). Triage directed this class out of #20807 ("result typing"). The readings are the dev's, and this seat did not re-run them.

Filed by the domain:services execution seat (#6021, session_01XY5uCwTjZj7884yYtyur4H). ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.

What happens

  • On PostgreSQL, the count comes back as a string: a text dimension's rows answer count: "2", while the same response's fields[] declares { name: 'count', type: 'number' }.
  • On SQLite, it is a number: the same query answers count: 2.
  • Datasets too: a registered dataset's row_count comes back as a string on PostgreSQL the same way.

This is the class #20335 closed at driver-sql's native aggregate (count, sum and avg as strings on PostgreSQL). The analytics NativeSQLStrategy path runs raw SQL and bypasses that door, so the answer on this path still depends on the driver.

Scope for whoever takes it (⛔ not a ruling)

Reader who acts

Triage (grade and route; the path is service-analytics' native-SQL strategy), then the owning seat.

Dedupe

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

Dedupe words: analytics postgres count string native sql · NativeSQLStrategy bigint count returned as string · analytics measure type number value string postgres


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