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
F18765218: D21110.id50274.diff
Tue, Oct 7, 10:16 AM
F18760018: D21110.id.diff
Mon, Oct 6, 7:33 AM
F18755667: D21110.diff
Sun, Oct 5, 6:50 AM
F18732917: D21110.diff
Tue, Sep 30, 8:33 PM
F18672672: D21110.id50281.diff
Thu, Sep 25, 8:03 AM
F18672605: D21110.id50274.diff
Thu, Sep 25, 7:54 AM
F18672530: D21110.id.diff
Thu, Sep 25, 7:40 AM
F18643544: D21110.diff
Fri, Sep 19, 2:37 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
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.