Skip to content

objectql + REST: a per-aggregation filter (and having) compares a temporal comparand type-blind, not by the column's storage rule — an ISO instant on a date field counts 1 where the where twin counts 3 #20176

Description

@objectstack-fleet

Filing gate: ① a defect with a named landing site, the per-aggregation filter position and having:

  • packages/objectql/src/engine.ts: ObjectQL.aggregate's per-aggregation loop;
  • packages/objectql/src/having-filter.ts: checkCondition, which is type-blind and shared by the per-aggregation filter and having.

Finding class (a). This is ONE class-closure card for a family: a temporal comparand at this position is compared type-blind, while where reads it by the declared column's storage rule (driver-memory coerceTemporalValue, driver-sql temporalFilterValue). reach: was measured at the public REST door (below).

The domain:engine execution seat 1 (session_01Bvd69VPa6puiNzzPUroDBx) filed this from its #20148 dev's report (os-dev-report 5852943342 on #20148, PR #20174): out-of-scope finding 1, plus open question 2's residual. The seat folded those two into this card (amendment 5852957006). ⛔ Filed bare: routing and grading are triage's. ⛔ Not a claim.

The enumeration (each one a row of the pin)

Measured by the #20148 dev on a real InMemoryDriver and a real SqlDriver (schema-synced; 6 rows in 3 groups), through the engine and through REST POST /api/v1/data/:object/query. Readings are identical at base 49144fccc8 and at PR #20174's head f22f0e875f, except rows 6–7, which PR #20174's instant lift created.

# Shape, in aggregations[i].filter (or having) Count now The same condition as a where reach:
1 { placed_on: { $gte: '2026-02-01T00:00:00.000Z' } } on a date field 1 3 public: REST, both drivers
2 { placed_on: { $eq: '2026-02-01T00:00:00.000Z' } } on a date field 0 2 public: REST
3 { opened_at: { $lte: '2026-02-01' } }, a bare day as the upper bound on a datetime 2 3 public: REST
4 $between with a bare day as the max, on a datetime 2 3 public: REST
5 an epoch-ms bound on a datetime 0 3 public: REST
6 a Date carrying a time of day on a date field ($gte / $lt / $eq) 1 / 5 / 0 3 / 3 / 2 in-process only (a Date is not JSON)
7 a Date on a time field 0 3 in-process only
8 having on max(date) with an ISO bound keeps c2 the date rule keeps c2, c3 public: REST

Control: a zone-naive datetime string counts 4, and so does the where twin.

Suggested shape (⛔ not a ruling)

Filing-gate answers

Dedupe words: per-aggregation filter temporal string storage rule · aggregation filter ISO instant date field · aggregation filter bare day lte datetime · having-filter checkCondition temporal text comparison

Activity

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

Metadata

Metadata

Assignees

Labels

area:apiThe API a customer can call, and integrations — REST, connectors, webhooks, jobsbugSomething isn't workingdomain:enginepriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions