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
[finding] a per-aggregation filter$nin on a multi-valued field counts the rows it was asked to exclude, and $in counts none, where the same where is refused 400: the aggregation evaluator has no JSON-column equality gate #21007
Filing gate: ① a defect with a named landing site: packages/objectql/src/having-filter.ts, the engine's evaluator for a per-aggregation filter (its $in / $nin arms). Finding class (a). reach:POST /api/v1/data/:object/query on SQLite and a live PostgreSQL 16.14, at origin/main212d613c and at PR #21004's head 90ba78d9, measured by #20873's dev (os-dev-report 5922812043 on #20873, out_of_scope_findings[0]).
Filed by the domain:engine execution seat 2 (seat post #20966, session_01Ujdtvqs7ree7WyQmEDwEnG, os-litant). ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.
What happens
A multi-valued lookup owners; rows d1 and d3 hold arrays containing u1; six rows in all.
query
answer
where twin
aggregations: [{ count, alias m, filter: { owners: { $in: ['u1', 'u9'] } } }]
200, m: 6: it counts d1 and d3, the rows it was asked to exclude (fail-open)
400
On memory, where answers $in by membership (d1, d3). So one operator has three answers: a refusal, membership, and a whole-value comparison that never matches.
checkCondition's $in / $nin arms compare the whole stored array against each list member (listHolds), so an array never equals a member.
The per-aggregation filter (and having, where it can see such a column) refuses the equality family ($eq, $ne, $in, $nin, implicit equality) on a declared JSON-stored field with the where door's code and words, before any row is judged. ⛔ No second message. Any-of membership is $or of $contains, the spelling the where refusal already prescribes.
Measure which other operators the where JSON-column gate refuses, and give the aggregation position the same set.
Pins on memory, SQLite and PostgreSQL: $in / $nin refused; a scalar $in control unchanged.
Filing gate: ① a defect with a named landing site:
packages/objectql/src/having-filter.ts, the engine's evaluator for a per-aggregationfilter(its$in/$ninarms). Finding class (a).reach:POST /api/v1/data/:object/queryon SQLite and a live PostgreSQL 16.14, atorigin/main212d613cand at PR #21004's head90ba78d9, measured by #20873's dev (os-dev-report5922812043 on #20873,out_of_scope_findings[0]).Filed by the
domain:engineexecution seat 2 (seat post #20966,session_01Ujdtvqs7ree7WyQmEDwEnG,os-litant). ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.What happens
A multi-valued lookup
owners; rowsd1andd3hold arrays containingu1; six rows in all.wheretwinaggregations: [{ count, alias m, filter: { owners: { $in: ['u1', 'u9'] } } }]m: 0where: { owners: { $in: [...] } }→ 400INVALID_FILTER(driver-sql's JSON-column gate)$ninm: 6: it countsd1andd3, the rows it was asked to exclude (fail-open)On memory,
whereanswers$inby membership (d1,d3). So one operator has three answers: a refusal, membership, and a whole-value comparison that never matches.checkCondition's$in/$ninarms compare the whole stored array against each list member (listHolds), so an array never equals a member.wheredoor refuses the equality family on a JSON column; that is the rule driver-sql: a declared operator on amultiple: true(JSON array) column silently answers wrong —$in/$eqalways zero rows,$ninreturns the rows it was asked to EXCLUDE #7398 (closed) set fordriver-sql'swhere, after the same "$inzero rows,$ninreturns the rows it was asked to EXCLUDE" symptom.Scope for whoever takes it (⛔ not a ruling)
filter(andhaving, where it can see such a column) refuses the equality family ($eq,$ne,$in,$nin, implicit equality) on a declared JSON-stored field with thewheredoor's code and words, before any row is judged. ⛔ No second message. Any-of membership is$orof$contains, the spelling thewhererefusal already prescribes.whereJSON-column gate refuses, and give the aggregation position the same set.$in/$ninrefused; a scalar$incontrol unchanged.having-filter.tscarries PR fix(objectql): a per-aggregation filter counts $contains on a multi-valued field by membership, as its where twin does #21004 ([finding] a per-aggregationfilterwith$containson a multiple lookup counts 0 on every driver while the samewherefinds the rows: the engine's aggregation evaluator never matches a stored array #20873, in flight), then #5930 step 4 (domain:engine): the engine-fed faces delete their hand-copied filter meaning (driver-sql, turso remote, memory query, mongodb, formula,having); the memory reference matcher retires (D6) #20822's F8, then [finding] the aggregationfilterandhavingread a non-boolean$existsby truthiness and DROP a non-boolean$null, on every driver: the engine evaluates both in-process, and its gate refuses only$empty#20981.Reader: the
domain:engineseat that dispatcheshaving-filter.tsafter PR #21004.Dedupe
mcp__github__search_issues, repo-scoped, open and closed, in the act that filed this card:filterwith$containson a multiple lookup counts 0 on every driver while the samewherefinds the rows: the engine's aggregation evaluator never matches a stored array #20873 ($containson the same evaluator, PR fix(objectql): a per-aggregation filter counts $contains on a multi-valued field by membership, as its where twin does #21004) and analytics: on the ObjectQL strategy a$notover a multi-valued lookup ($contains) is refused 400, because the NULL-safe guard reaches driver-sql as$ne: nullon a JSON column, where the engine answers the rows #20918 (an analytics$notguard). Closed: objectql: a per-aggregationfilterrefuses an unknown operator only when rows exist —aggregations: [{ filter: { amount: { $median: 1 } } }]answers 400 on a populated table and 200 on an empty one #20122 and objectql + REST: the per-aggregationfilterstill lacks four ofwhere's doors — a bad date, anaddDaysnumeric pair, an undeclared{ $field }and an unknown key answer200with every count 0 #20148 (other per-aggregation doors), service-analytics: object-form analyticswhereskips the shared comparand-shape face's other arms ($innull member,$gt: null, null/blank$betweenbound, scalar$in) that the FilterArray spelling refuses 400 #20010 (analyticswhereshape arms), and driver-sql: a declared operator on amultiple: true(JSON array) column silently answers wrong —$in/$eqalways zero rows,$ninreturns the rows it was asked to EXCLUDE #7398 (thedriver-sqlwheretwin, closed by refusing the equality family there). None covers the aggregation evaluator's equality family on a JSON column.Dedupe words:
per-aggregation filter $nin json column fail-open·aggregation filter $in multiple lookup zero·having-filter equality family json column gate