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

Implement schema propagation for $lookup stage in query analysis (FLE1 schemas)

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration

      FLEPipeline currently accepts a single encryption schema, as a unique_ptr<EncryptionSchemaTreeNode>. FLEPipeline needs to be modified to accept an EncryptionSchemaMap (i.e map<NamespaceString, EncryptionSchemaTreeNode*>).

      We will then need to provide an implementation for propagateSchemaForLookup, which correctly propagates the desired schema for the result of the $lookup "as" array.

      As mentioned in the scope and design, we will not support using encrypted fields that are within the "as" array in any operations following the $lookup.

       

       

      In addition, the following constraints must also be enforced as part of this change:

       

      1. Test the following test cases with both CSFLE and QE schemas
        1. Join fields are both encrypted -> Fail 
        2. Local join field encrypted/foreign join field unencrypted -> Fail
        3. Local join field unencrypted/Foreign join field encrypted -> fail
        4. No encrypted fields used as join field -> Succeed
        5.  
        6. Test that mixing CSFLE & QE schemas is not supported.

            Assignee:
            santiago.roche@mongodb.com Santiago Roche
            Reporter:
            santiago.roche@mongodb.com Santiago Roche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: