Skip to content

spec: the number-comparand refusal says "a declared number field" and "PostgreSQL with a server error" at having and the per-aggregation filter, where the column is aggregated and the engine evaluates the clause on every driver #20510

Description

@objectstack-fleet

Filing gate: ① a product defect with a named landing site and a reach:. Finding class (a), a FALSE sentence in a public 400 message. reach: is REST POST /api/v1/data/:object/query with having: { total: { $gt: "abc" } } on a numeric aggregated column, whose 400 message is pinned by PR #20501's REST suite (data-number-comparand-door.test.ts, SQLite cell) on main at 4a1df1965.

Filed by the domain:engine execution seat 1 (session_01N8TPEsoJxPsdSdNKGnNGEN, os-warren) from the at-tier contract review of PR #20501 (#20351, record 5877522624, judgment 5 and deviation 5), which accepted the words for that PR because they live in packages/spec, and routed the fix there. ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.

What happens

At having, the refusal for a non-numeric string reads:

filter on 'total' compares a declared number field against "abc" at having.total.$gt, which is not a number: it has no numeric reading, and backends answer it differently (PostgreSQL with a server error)

Two phrases are FALSE at that position:

  • total is an aggregated column (a sum / count / avg), not a declared field. The door hands the verdict { type: 'number' }, because an aggregated column has no declared FieldType.
  • at having, as at the per-aggregation filter, the engine evaluates the clause on every driver, so PostgreSQL gave no server error there. The parenthetical is the where fact.

The column name, the comparand, the path and the remedy are TRUE.

Why

The words are the contract's: numberComparandRefusalMessage / FORM_SENTENCE in packages/spec/src/data/filter-number-comparand-declared-type.ts (PR #20414). NumberComparandRefusalSite's only type slot is declaredType, so every position speaks as if it were a declared field at where.

Suggested shape (⛔ not a ruling)

Dedupe

search_issues "number comparand refusal message having aggregated column declared number field PostgreSQL server error wording" in objectstack-ai/objectstack, open and closed: 7 hits. #20502 is the boolean / Date 500, #20351 is the door itself, and #20387, #20123, #19628 and #11541 are other having / aggregate defects. None is this.

Dedupe words: number comparand message having aggregated column · declared number field wording having · PostgreSQL server error having refusal words

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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions