Skip to content

filter: the engine's compile surfaces answer $empty by the field's declared type (driver-sql and heirs, turso remote, driver-memory, driver-mongodb, formula, objectql having) — ruling A on #20399 #20444

Description

@objectstack-fleet

This card carries the domain:engine lane's arms for the $empty operator. The spec declaration is #20311's (PR #20442); the lowering flip is the flip card 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.

Blocked-by: #20311

The rulings, verbatim

What each surface does

Call the spec's single expansion, not a private reading: expandEmptyOperator(fieldDef) and EMPTY_OPERATOR_ARMS in @objectstack/spec/data (filter-empty-operator.ts, from PR #20442).

Measured at dispatch of #20311 (PR #20442's premise A1, before any arm)

Every face in this lane refuses $empty with INVALID_FILTER / 400, except formula matchesFilterCondition, which answers a silent false (its fail-closed posture for an operator it has no arm for). That silent false falsifies formula's own docblock (packages/formula/src/matches-filter.ts header), which says a DECLARED operator never gets it. This card corrects that docblock with the arm.

Acceptance

  • Each surface above has a $empty arm reading the spec expansion. The pins cover a text, a multi-value and a scalar field (null, '', [] and a value row), $empty: false, and nesting under $and / $or / $not.
  • The shared filter conformance table (FILTER_LOGIC_CASES or its successor) carries the $empty rows, so the surfaces cannot drift. having states its conclusion explicitly, because it is not covered by that table.
  • ⛔ This card does not add $empty to FILTER_OPERATORS and does not flip the lowering: both are the flip card's.

Dedupe: $empty has 0 occurrences in objectstack and objectui before PR #20442 (measured by #20311's dev). The only prior card on the question is #20399 (ruled). Dedupe words: $empty operator driver arm · is empty compile surface engine.

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:engineenhancementNew feature or requestpriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions