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)
Tue, Dec 31, 9:55 PM
Unknown Object (File)
Thu, Dec 26, 3:46 AM
Unknown Object (File)
Fri, Dec 20, 8:34 PM
Unknown Object (File)
Nov 27 2024, 6:27 AM
Unknown Object (File)
Oct 24 2024, 5:35 AM
Unknown Object (File)
Oct 21 2024, 7:44 AM
Unknown Object (File)
Oct 18 2024, 3:29 AM
Unknown Object (File)
Oct 15 2024, 3:15 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
Branch
ferret5
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 24092
Build 33171: Run Core Tests
Build 33170: arc lint + arc unit

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.