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
F13973975: D21110.id.diff
Fri, Oct 18, 3:29 AM
F13963322: D21110.diff
Tue, Oct 15, 3:15 PM
F13963321: D21110.diff
Tue, Oct 15, 3:15 PM
F13959074: D21110.id50274.diff
Mon, Oct 14, 5:46 PM
Unknown Object (File)
Wed, Oct 9, 1:19 PM
Unknown Object (File)
Sat, Sep 21, 7:49 PM
Unknown Object (File)
Sep 11 2024, 11:10 PM
Unknown Object (File)
Sep 4 2024, 11:44 AM
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.