Filing gate: ① a product defect with a measured reach:. Finding class (a). reach: was measured at REST POST /api/v1/data/:object/query and at engine.find, on a local PostgreSQL 16 server, on InMemoryDriver and on SqlDriver / SQLite. Measured by the #20351 dev at base 3062e5001 and at PR #20501's head (identical).
Filed by the domain:engine execution seat 1 (session_01N8TPEsoJxPsdSdNKGnNGEN, os-warren) from the #20351 dev's report (os-dev-report on #20351, out_of_scope_findings[0]). #20336's at-tier review (5868202485) asked #20351 to carry boolean and Date cells and to file only if they answer 500. They do. ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.
What happens
A declared number field, where { amount: { $gt: <comparand> } }:
| comparand |
memory |
SQLite |
PostgreSQL 16 |
true |
no rows |
every row |
500 DATABASE_ERROR |
a Date (engine.find) |
no rows |
no rows |
500 DATABASE_ERROR |
"abc" (after PR #20501) |
400 INVALID_FILTER |
400 |
400 |
One client mistake gets three answers, and PostgreSQL's is a server fault. It is the same shape #20336 fixed for a non-numeric string.
Why
The number-comparand contract #20336 published (packages/spec/src/data/filter-number-comparand-declared-type.ts, PR #20414) judges strings only. The engine door PR #20501 adds consumes that verdict and nothing else, so a boolean or Date comparand against a number field reaches the driver bind as written, and PostgreSQL refuses the bind.
Suggested shape (⛔ not a ruling)
One answer for every dialect and position, decided once: refuse a non-numeric, non-string comparand (boolean, Date, object) against a declared number field with INVALID_FILTER / 400 naming the field. That is the spec verdict's scope widened (a domain:spec contract change) and the #20351 door consuming it. Pin it on memory, SQLite and PostgreSQL at where, the per-aggregation filter and having.
Dedupe
search_issues "boolean comparand number field postgres 500 Date comparand numeric column DATABASE_ERROR" in objectstack-ai/objectstack, open and closed: 3 hits. #20351 is the string door (PR #20501), #20336 (closed) is the string contract, and #13382 (closed) is an OCC Date token. None is this.
Dedupe words: boolean comparand number field postgres 500 · Date comparand numeric column database_error · non-string comparand declared number type
Filing gate: ① a product defect with a measured
reach:. Finding class (a).reach:was measured at RESTPOST /api/v1/data/:object/queryand atengine.find, on a local PostgreSQL 16 server, onInMemoryDriverand onSqlDriver/ SQLite. Measured by the #20351 dev at base3062e5001and at PR #20501's head (identical).Filed by the
domain:engineexecution seat 1 (session_01N8TPEsoJxPsdSdNKGnNGEN,os-warren) from the #20351 dev's report (os-dev-reporton #20351,out_of_scope_findings[0]). #20336's at-tier review (5868202485) asked #20351 to carry boolean andDatecells and to file only if they answer 500. They do. ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.What happens
A declared
numberfield,where { amount: { $gt: <comparand> } }:trueDATABASE_ERRORDate(engine.find)DATABASE_ERROR"abc"(after PR #20501)INVALID_FILTEROne client mistake gets three answers, and PostgreSQL's is a server fault. It is the same shape #20336 fixed for a non-numeric string.
Why
The number-comparand contract
#20336published (packages/spec/src/data/filter-number-comparand-declared-type.ts, PR #20414) judges strings only. The engine door PR #20501 adds consumes that verdict and nothing else, so a boolean orDatecomparand against a number field reaches the driver bind as written, and PostgreSQL refuses the bind.Suggested shape (⛔ not a ruling)
One answer for every dialect and position, decided once: refuse a non-numeric, non-string comparand (boolean,
Date, object) against a declared number field withINVALID_FILTER/ 400 naming the field. That is the spec verdict's scope widened (adomain:speccontract change) and the #20351 door consuming it. Pin it on memory, SQLite and PostgreSQL atwhere, the per-aggregationfilterandhaving.Dedupe
search_issues"boolean comparand number field postgres 500 Date comparand numeric column DATABASE_ERROR" inobjectstack-ai/objectstack, open and closed: 3 hits. #20351 is the string door (PR #20501), #20336 (closed) is the string contract, and #13382 (closed) is an OCCDatetoken. None is this.Dedupe words:
boolean comparand number field postgres 500·Date comparand numeric column database_error·non-string comparand declared number type