Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-65324

Allow comparisons of encrypted fields to expressions which resolve to constants

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Optimization

    Description

      Currently, there is a restriction where encrypted fields can only be compared to constant expressions, e.g.:

      {$expr: {$eq: ["encryptedInt", {$add: [1, 2, 3]}]}}

      This ticket is to extend support to expressions which resolve to constants, for example:

      {$expr: {$eq: ["encryptedInt", {$cond: [{$eq: [$unencrypted, "abc"]}, 2, 3]}]}}.

      The work required to support this is 1) allowing comparisons to expressions other than ExpressionConstant in query analysis (though we should still try to make sure the comparison will resolve to a constant) and 2) adding a new rewrite on the server-side to support more complicated query shapes.

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            hana.pearlman@mongodb.com Hana Pearlman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: