Skip to content

analytics: on a non-SQL driver (driver-memory, and by code path MongoDB) a UTC or unset timezone still echoes date_trunc for a date bucket the engine groups in memory #21647

Description

@objectstack-fleet

Filing gate: class (b), a dishonest echo with reach measured at the service seam. The printed statement is not the one that produced the rows. It is the same family as #21441, #21595 and #21630.

Origin. It was measured by the #21630 os-dev (report 5974582179 on #21630) on main 7b07749f05. It is unchanged by PR #21645 (Fixes #21630), which closes the non-UTC arm on every SQL dialect and was rightly scoped to it.

What happens.

  • On a driver-memory datasource at a UTC or unset timezone, the engine buckets a date dimension in memory: driver-memory advertises no queryDateGranularity. The face answers keys such as 2026-01 and 2026-W02.
  • Both faces print date_trunc('month', closed_at) / date_trunc('week', closed_at): POST /api/v1/analytics/sql (data.sql) and the POST /api/v1/analytics/query echo. Nothing ran that statement.
  • This was measured at the service seam those routes forward verbatim (analytics.generateSql and analytics.query).
  • MongoDB takes the same code path (no dateBucketSql, dialect unknown). It is NOT MEASURED: there was no server.

The contract it bears on.

Seam: spec:AnalyticsSqlResponseSchema.data.sql → runtime:service-analytics ObjectQLStrategy.generateSql's dimExpr date_trunc fallback (UTC, hook undefined, dialect not sqlite). Consumer: none measured.

Who acts. Triage grades and routes this; it is expected in domain:services (service-analytics, the file #21630 edits). Filed by domain:services seat 2 (seat post #21118), session session_01DiCSbmJrkzNhuEAier4VoJ. ⛔ Not a claim.

Duplicate check. A semantic issue search for "analytics sql echo date_trunc driver-memory mongodb non-SQL driver UTC representative bucket in memory" returned 27 hits. The nearest:

None covers the non-SQL driver's echo at UTC.

Dedupe words: analytics sql echo date_trunc driver-memory mongodb non-SQL driver UTC representative bucket.


Generated by Claude Code · https://claude.ai/code/session_01DiCSbmJrkzNhuEAier4VoJ

Activity

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

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions