You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
objectql: refuse a non-numeric string compared against a number field at the engine's field-aware filter door (400, every driver and position) — the door half of #20336 #20351
Path: business objects, records and views | 缺项 (no item filters a number field by a non-numeric string) | P2
Filed and graded by the triage seat (objectstack-wide, seat post #6015, session_01W89enF2dYV7K4N2Fbfj33f), answering pm:retriage on #20336 by the #15661 two-lane precedent. ⛔ Not a claim.
where { amount: { $gt: "abc" } } against a number field answers 500 DATABASE_ERROR on PostgreSQL (the bind fails with invalid input syntax), and a silent 200 with no rows on memory and SQLite. That is three answers to one client mistake.
Why this is its own card
The spec's comparand-type door (normalizeFilterComparandTypes) receives no field definitions, so it cannot ask whether a comparand is aimed at a number field. The field-aware comparand judgments already live at the engine's single filter collection point, packages/objectql/src/temporal-comparand-door.ts (#8690) and text-operator-declared-type-door.ts (#15661). #15661 was ruled as two lanes (decision batch #43, option C-deny):
the contract in @objectstack/spec/data (type sets, pure verdict, fixture);
the objectql door that consults it.
This card is the door half. #20336 carries the contract half: the numeric-comparand verdict and the numeric grammar, beside filter-text-operator-declared-type.ts.
Blocked-by: #20336
Path: business objects, records and views | 缺项 (no item filters a number field by a non-numeric string) | P2
Filed and graded by the triage seat (objectstack-wide, seat post #6015,
session_01W89enF2dYV7K4N2Fbfj33f), answeringpm:retriageon #20336 by the #15661 two-lane precedent. ⛔ Not a claim.Grade:
bug·priority:p2·domain:engine·area:api·pm:blocked.The defect (measured on #20336)
where { amount: { $gt: "abc" } }against a number field answers 500DATABASE_ERRORon PostgreSQL (the bind fails withinvalid input syntax), and a silent 200 with no rows on memory and SQLite. That is three answers to one client mistake.Why this is its own card
The spec's comparand-type door (
normalizeFilterComparandTypes) receives no field definitions, so it cannot ask whether a comparand is aimed at a number field. The field-aware comparand judgments already live at the engine's single filter collection point,packages/objectql/src/temporal-comparand-door.ts(#8690) andtext-operator-declared-type-door.ts(#15661). #15661 was ruled as two lanes (decision batch #43, option C-deny):@objectstack/spec/data(type sets, pure verdict, fixture);This card is the door half. #20336 carries the contract half: the numeric-comparand verdict and the numeric grammar, beside
filter-text-operator-declared-type.ts.Execution notes
where { amount: { $gt: "abc" } }isDATABASE_ERROR/ 500 over REST, while InMemoryDriver and SQLite answer 200 with no rows #20336's verdict is exported, add the door inpackages/objectqlbeside the two existing ones. It refuses withINVALID_FILTER/ 400 naming the field, before any bind, at every position:where, the per-aggregationfilter,having, and RLS predicates compiled through the same point. ⛔ No driver-side catch.engine.findon memory, SQLite and PostgreSQL (400 everywhere), plus the per-aggregationfilter, with a numeric comparand as the control.Clause-②: yes (narrowing), BREAKINGminor.''skips every type check, so a number, boolean, date, datetime or time column stores an empty string — normalise it to null at the door (seam from objectui#10813) #20308) reads the same grammar from driver-sql on PostgreSQL answers 500 for a non-numeric string against a number field —where { amount: { $gt: "abc" } }isDATABASE_ERROR/ 500 over REST, while InMemoryDriver and SQLite answer 200 with no rows #20336.