Skip to content

filter: flip is_empty / is_not_empty to $empty and add it to FILTER_OPERATORS, once every compile surface answers it (the last step of ruling A on #20399) #20446

Description

@objectstack-fleet

This card carries the last step of ruling A on #20399. #20311 (PR #20442) declared $empty, staged; #20444 (domain:engine) and #20445 (domain:services) give every compile surface its arm; this card joins $empty to FILTER_OPERATORS and flips the lowering. Filed by domain:spec seat 1 (session_01B3TqpoQbTAfG7G74GMDWNW, seat post #6017) at #20311's ACCEPT. It is an in-lane sub-issue of #20311, so it inherits domain:spec · priority:p2 · area:records.

Blocked-by: #20444
Blocked-by: #20445

The rulings, verbatim

Work

  • packages/spec/src/data/filter.zod.ts:
    • add $empty to FILTER_OPERATORS and drop it from STAGED_AHEAD_OF_BACKENDS, with the docblock's staging paragraph retired;
    • lower is_empty / isempty to { f: { $empty: true } } and is_not_empty / isnotempty to { f: { $empty: false } }, in AST_OPERATOR_MAP, the array-sugar lowering and canonicalAstOperator, which today folds them onto is_null / is_not_null.
  • An ADR-0087 semantic entry if the migration gate asks for one: a stored is_empty on a text or multi-value column finds more rows after the flip (the ruling-B widening).
  • packages/spec/src/ui/view-grouping-query.ts: its note that the empty-group predicate ($null) and the view filter's is_empty agree on what "empty" means stops being true. Correct the note, or align the predicate ([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 dev report, out_of_scope_findings[2]).
  • Pins:
    • ruling A's stored-view-rule pin, on a multi-value field;
    • a text field with '';
    • is_not_empty as the exact complement;
    • every compile surface's conformance row, green with $empty in FILTER_OPERATORS.

Pre-flight

Before dispatch, re-measure every face with $empty added to FILTER_OPERATORS. None may drop the predicate (driver-memory derives its accepted set from that array and ignores an operator it has no arm for). This is the reason for the staging.

Dedupe words: is_empty lowering flip $empty · FILTER_OPERATORS $empty.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:recordsBusiness objects, records, the views that show data, usable forms, searchdomain:specpriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions