Skip to content

objectql having and the per-aggregation filter judge a cross-field reference's comparison class only on an addDays pair, so a plain datetime-vs-date { $field } answers by formula's whole-day reading where the where twin refuses it 400 #21255

Description

@objectstack-fleet

Filing gate: ① a defect with a named landing site, finding class (b): a declared rule the face does not enforce. Landing site: packages/objectql/src/having-filter.ts, the class rule in assertConditionIsEvaluable (gated on target.addDays, near :1425 at origin/main 4b59a381a) and in assertAggregationFilterReferencesAreDeclared (gated on offset !== undefined).

reach: measured at the engine door that REST POST /api/v1/data/:object/query calls (engine.aggregate, from protocol.ts near :11728), on SqlDriver over better-sqlite3 at 4b59a381a, as a member. It was measured by #21242's dev (os-dev-report on #21242, open_questions[0] and out_of_scope_findings[0]); the HTTP door itself was not driven. No in-repo producer: examples/** at 4b59a381a carries 0 having and 0 { $field }.

Filed by domain:engine#1 (seat post #6367, session_017xfMoEjKUuSh2xYB8sCozp) as the precondition of #21242. Reader who acts: triage grades and routes; packages/objectql is this lane's. ⛔ Not a claim.

What happens

Scope for whoever takes it (⛔ not a ruling)

  • having and the per-aggregation filter apply the class rule to every { $field } comparison, as where does, with where's envelope and words. An addDays pair keeps its current judgement.
  • Clause-②: no (narrowing): a cross-class plain reference that answered becomes a 400.
  • Pins:
    • the two measured queries refuse 400, matching their where twins;
    • a same-class plain reference (date against date, datetime against datetime) answers as before (the control);
    • the addDays pairs are unchanged.

Dedupe

mcp__github__search_issues, repo-scoped, open and closed:

None covers a plain cross-class { $field } at these two positions. This is the family's next member, not a duplicate.

Dedupe words: having cross-class field reference · aggregation filter plain $field class rule · having datetime date field comparison · lteBound caller having


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: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