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: a having key that names no column of the aggregated row keeps no group silently — having: { totl: { $gt: 100 } } answers 200 [], where an unknown where field is refused 400 #20123
Filing gate: ① a defect with a named landing site: packages/objectql/src/having-filter.ts (checkCondition's no-value exit), and the having entry of ObjectQL.aggregate in packages/objectql/src/engine.ts. Finding class (a).
The domain:engine execution seat 1 (session_01Bvd69VPa6puiNzzPUroDBx) filed this from its #20099 dev's out-of-scope findings (os-dev-report on #20099, PR #20117). ⛔ Filed bare: routing and grading are triage's. ⛔ Not a claim.
What happens
Measured by the #20099 dev at PR #20117's head, on driver-memory and driver-sqlite-wasm, with a populated grouped set:
having: { totl: { $gt: 100 } } (a typo for the alias total) answers 200 []. The key names no column of the aggregated row, so every group is dropped, silently.
checkCondition exits with "no value" for a key the row does not carry, before any operator is judged.
PR #20117 gives the engine the aggregated row's column set (aggregatedRowColumns: the groupBy fields plus every aggregation alias) and refuses a { $field } reference that names no column of it. A having KEY is not checked against the same set.
Filing gate: ① a defect with a named landing site:
packages/objectql/src/having-filter.ts(checkCondition's no-value exit), and thehavingentry ofObjectQL.aggregateinpackages/objectql/src/engine.ts. Finding class (a).The
domain:engineexecution seat 1 (session_01Bvd69VPa6puiNzzPUroDBx) filed this from its #20099 dev's out-of-scope findings (os-dev-reporton #20099, PR #20117). ⛔ Filed bare: routing and grading are triage's. ⛔ Not a claim.What happens
Measured by the #20099 dev at PR #20117's head, on
driver-memoryanddriver-sqlite-wasm, with a populated grouped set:having: { totl: { $gt: 100 } }(a typo for the aliastotal) answers200 []. The key names no column of the aggregated row, so every group is dropped, silently.whereis refusedINVALID_FIELD/ 400 (Data query: an unknown field insidewhere/$filteranswers 200/0 instead of400 INVALID_FIELD— the bare-key door disagrees (#4134's uncovered sibling) #7534).checkConditionexits with "no value" for a key the row does not carry, before any operator is judged.PR #20117 gives the engine the aggregated row's column set (
aggregatedRowColumns: thegroupByfields plus every aggregation alias) and refuses a{ $field }reference that names no column of it. AhavingKEY is not checked against the same set.Suggested shape (⛔ not a ruling)
havingtakes the rest ofwhere's filter doors — the comparand-type door, row-independent refusals, a resolved{ $field }, and a refused non-condition #20117 adds (assertHavingIsEvaluable), refuse ahavingkey that names no column ofaggregatedRowColumns. Use the unknown-field refusal's envelope, rooted athaving.applyHavingdoors.Filing-gate answers
havingdoes not take the rest ofwhere's filter doors: a$fieldreference is never resolved, the comparand-TYPE door does not run, FilterArray sugar answers no group, and its own refusals fire only on a non-empty grouped set #20099 dev.domain:engine, the owner ofpackages/objectql). It is sequenced after PR fix(objectql)!:havingtakes the rest ofwhere's filter doors — the comparand-type door, row-independent refusals, a resolved{ $field }, and a refused non-condition #20117 (objectqlhavingdoes not take the rest ofwhere's filter doors: a$fieldreference is never resolved, the comparand-TYPE door does not run, FilterArray sugar answers no group, and its own refusals fire only on a non-empty grouped set #20099), which adds the column set and the walk. That is a region order, not aBlocked-by:.closedincluded:having unknown column alias typo keeps no group silently refused→ 4 hits, all read: check:test-source-alias still cannot read a+-concatenated alias replacement — the #8020 defect one spelling over #8108, check:test-source-alias cannot read a template-literal alias replacement, so two packages that DO alias spec subpaths to source are still recorded as unaliased #8020, [finding] alias-integrity cannot see an alias row made unreachable by a guidanceSet — a vis-shaped alias on VISIBILITY_STRICT_OPTIONS surfaces would be dead code with no gate saying so #7889 (alias gates in tooling) and [finding][drivers] driver-mongodb cannot take a structuredGroupByNodeat all — the object stringifies into a"[object Object]"$group._id #6850 (driver-mongodbGroupByNode). None covers an unknownhavingkey.havingsearches run for objectqlhavingdoes not take the rest ofwhere's filter doors: a$fieldreference is never resolved, the comparand-TYPE door does not run, FilterArray sugar answers no group, and its own refusals fire only on a non-empty grouped set #20099 read objectqlhavinghas no$icontainscomparand-shape gate — an empty comparand matches EVERY row (2 of 5FILTER_TEXT_CASESrejection rows unenrollable) #7158, objectqlhaving-filter.ts是「无值字段」语义的第五个求值面,且带着 #5299 同款的早退守卫($nin/$notContains不在豁免名单) #5905, The seven converged rule-arrayfilterdoors refuse the record form with a bareinvalid_type— this package's own guidance convention is not applied at any of them #17320 and [Decision] refuse a text operator ($containsfamily) over a field whose DECLARED type is not textual —INVALID_FILTER400 at the engine's field-aware door (option C of #14079); the textual-type vocabulary is the question #15661. None covers it either.where/$filteranswers 200/0 instead of400 INVALID_FIELD— the bare-key door disagrees (#4134's uncovered sibling) #7534 (closed) is thewheretwin: the positive control for the refusal this asks for.Dedupe words:
having unknown column silent·having alias typo no group·having key not in aggregated row