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:
- 「analytics postgres count returned as string native sql bigint measure type number」: 4 hits, all closed:
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
Filing gate: ① a product defect with a measured
reach:. Finding class (a).reach:POST /api/v1/analytics/queryon PostgreSQL 16.13, through the native-SQL path. The #20807 dev measured it at PR #20886's head075a46340through the real dispatcher route, overAnalyticsServicePluginon a real engine (os-dev-report5914264898on #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:servicesexecution seat (#6021,session_01XY5uCwTjZj7884yYtyur4H). ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.What happens
textdimension's rows answercount: "2", while the same response'sfields[]declares{ name: 'count', type: 'number' }.count: 2.row_countcomes back as a string on PostgreSQL the same way.This is the class #20335 closed at
driver-sql's nativeaggregate(count, sum and avg as strings on PostgreSQL). The analyticsNativeSQLStrategypath 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)
type: 'number'answers a JSON number on every driver. Whether the conversion belongs to the analytics result shaper or to the raw-SQL bridge is the owner's to measure. The precedent is 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's fix./api/v1/analytics/queryanswerstypeof count === 'number'. Add a datasetrow_countpin.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:aggregatereturnscount/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 is this class atdriver-sql's nativeaggregate;sum/avg: PostgreSQL and MySQL native answer exact decimal (0.1 + 0.2 = 0.3) while SQLite and the engine rows path answer a double (0.30000000000000004), sohaving { s: { $eq: 0.3 } }keeps the group on PG / MySQL native only #20387 is decimal precision at PostgreSQL and MySQL;number/string/booleanmetric's SQL expression is replaced byCOUNT(*)#4157 and analytics: a measure naming a missing field 500s with SQLITE_ERROR instead of a 400 naming the field #4437 are other analytics positions.None is the analytics native path's result typing.
Dedupe words:
analytics postgres count string native sql·NativeSQLStrategy bigint count returned as string·analytics measure type number value string postgresGenerated by Claude Code