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
analytics: service-analytics' two filter faces answer $empty by the field's declared type (read-scope SQL, the analytics where) — ruling A on #20399 #20445
This card carries the domain:services lane's arms for the $empty operator. The spec declaration is #20311's (PR #20442); the engine lane's arms and the lowering flip are the sibling cards filed alongside this one. Filed by domain:spec seat 1 (session_01B3TqpoQbTAfG7G74GMDWNW, seat post #6017) at #20311's ACCEPT, as ruling A's execution parameters order. ⛔ Filed without domain:* / grade: the lane below is the ruling's; triage applies the labels.
lowerAnalyticsWhere together with normalizeAnalyticsFilterTree (packages/services/service-analytics/src/strategies/filter-normalizer.ts)
Each expands { f: { $empty: true | false } } into the declared arm through the spec's single expansion, expandEmptyOperator(fieldDef) / EMPTY_OPERATOR_ARMS from @objectstack/spec/data (PR #20442):
text-like: null or '';
multi-value: null or [];
every other type: null only;
$empty: false is the complement.
⛔ No $eq: [] comparand: ruling 乙 on #19757 stands.
Measured at dispatch of #20311 (PR #20442's premise A1)
lowerAnalyticsWhere passes $empty through, and normalizeAnalyticsFilterTree then refuses it with INVALID_FILTER / 400.
compileScopedFilterToSql refuses it with READ_SCOPE_COMPILE_FAILED / 500. That code answers every unknown operator, $bogus included, where the other faces answer INVALID_FILTER / 400. This is loud and fail-closed, and it predates the card. Say in the PR whether the read-scope face should answer an authoring mistake with 400; do not change it silently.
Acceptance
Both faces answer $empty by the declared arm, with pins for text, multi-value and scalar fields (null, '', [] and a value row), $empty: false, and nesting under $and / $or / $not.
⛔ This card does not add $empty to FILTER_OPERATORS and does not flip the lowering.
This card carries the
domain:serviceslane's arms for the$emptyoperator. The spec declaration is #20311's (PR #20442); the engine lane's arms and the lowering flip are the sibling cards filed alongside this one. Filed bydomain:specseat 1 (session_01B3TqpoQbTAfG7G74GMDWNW, seat post #6017) at #20311's ACCEPT, as ruling A's execution parameters order. ⛔ Filed withoutdomain:*/ grade: the lane below is the ruling's; triage applies the labels.Blocked-by: #20311
The rulings, verbatim
$emptyoperator, or reopen the empty-list refusal (ruling B on #20311, its third arm) #20399 (5865693155): 「One sibling card per compile-surface lane, eachBlocked-by:[Decision] what 「is empty」 means on a text column and on a multi-value column: null only (the spec's lowering today), or null OR''/[]— three objectui builders disagree, and a stored sharing rule's rows depend on the answer #20311's spec PR:domain:engine— driver-sql and its heirs, tursoRemoteTransport, driver-memory, driver-mongodb, formula, objectqlhaving;domain:services— service-analytics' two faces.」''/[]— three objectui builders disagree, and a stored sharing rule's rows depend on the answer #20311 as5868169573): 「照 $like 先例分阶段」.$emptystays out ofFILTER_OPERATORSuntil every surface has its arm.The two faces
compileScopedFilterToSql(packages/services/service-analytics/src/read-scope-sql.ts)lowerAnalyticsWheretogether withnormalizeAnalyticsFilterTree(packages/services/service-analytics/src/strategies/filter-normalizer.ts)Each expands
{ f: { $empty: true | false } }into the declared arm through the spec's single expansion,expandEmptyOperator(fieldDef)/EMPTY_OPERATOR_ARMSfrom@objectstack/spec/data(PR #20442):'';[];$empty: falseis the complement.⛔ No
$eq: []comparand: ruling 乙 on #19757 stands.Measured at dispatch of #20311 (PR #20442's premise A1)
lowerAnalyticsWherepasses$emptythrough, andnormalizeAnalyticsFilterTreethen refuses it withINVALID_FILTER/ 400.compileScopedFilterToSqlrefuses it withREAD_SCOPE_COMPILE_FAILED/ 500. That code answers every unknown operator,$bogusincluded, where the other faces answerINVALID_FILTER/ 400. This is loud and fail-closed, and it predates the card. Say in the PR whether the read-scope face should answer an authoring mistake with 400; do not change it silently.Acceptance
$emptyby the declared arm, with pins for text, multi-value and scalar fields (null,'',[]and a value row),$empty: false, and nesting under$and/$or/$not.$emptytoFILTER_OPERATORSand does not flip the lowering.Dedupe words:
$empty operator analytics read scope·is empty analytics where.