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
F13522884: D21110.id.diff
Fri, Jul 26, 7:37 AM
Unknown Object (File)
Tue, Jul 23, 11:56 AM
Unknown Object (File)
Mon, Jul 22, 3:49 PM
Unknown Object (File)
Mon, Jul 22, 1:15 PM
Unknown Object (File)
Mon, Jul 22, 1:11 PM
Unknown Object (File)
Mon, Jul 22, 11:04 AM
Unknown Object (File)
Thu, Jul 18, 11:14 PM
Unknown Object (File)
Wed, Jul 17, 11:26 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.