Page MenuHomePhabricator

Implement the "present" and "absent" operators in the Ferret execution engine
ClosedPublic

Authored by epriestley on Apr 14 2020, 5:22 PM.
Tags
None
Referenced Files
F18914401: D21110.id.diff
Sun, Nov 9, 6:52 AM
F18903875: D21110.diff
Sat, Nov 8, 6:40 AM
F18840588: D21110.diff
Tue, Oct 28, 2:29 AM
F18836583: D21110.id50274.diff
Mon, Oct 27, 2:25 AM
F18765218: D21110.id50274.diff
Oct 7 2025, 10:16 AM
F18760018: D21110.id.diff
Oct 6 2025, 7:33 AM
F18755667: D21110.diff
Oct 5 2025, 6:50 AM
F18732917: D21110.diff
Sep 30 2025, 8:33 PM
Subscribers
None

Details

Summary

Ref T13509. Now that the compiler can parse these queries, actually implement them.

These are fairly easy to implement:

  • For present, just "JOIN". If it works, the field is present.
  • For absent, we "LEFT JOIN" and then "WHERE any_column IS NULL".
Test Plan

Searched for various documents with and without fields present, got sensible results in Maniphest. For example, "body:-" finds tasks with no body, "body:- duck" finds tasks with no body and "duck" elsewhere in the content, and so on.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Apr 14 2020, 5:55 PM
This revision was automatically updated to reflect the committed changes.