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
Unknown Object (File)
Thu, Apr 11, 8:38 AM
Unknown Object (File)
Wed, Apr 3, 2:07 PM
Unknown Object (File)
Mon, Apr 1, 2:09 AM
Unknown Object (File)
Thu, Mar 28, 5:55 PM
Unknown Object (File)
Jan 25 2024, 2:17 AM
Unknown Object (File)
Jan 17 2024, 6:00 PM
Unknown Object (File)
Dec 25 2023, 1:46 PM
Unknown Object (File)
Dec 24 2023, 10:04 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.