[SERVER-39417] [FLE] Handle comparisons to objects in a match expression Created: 07/Feb/19  Updated: 29/Oct/23  Resolved: 15/Mar/19

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 4.1.10

Type: Task Priority: Major - P3
Reporter: Nicholas Zolnierz Assignee: Nicholas Zolnierz
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-39233 [FLE] Implement method for replacing ... Closed
depends on SERVER-39252 [FLE] Handle $eq to an object in a Ma... Closed
Documented
is documented by DOCS-12549 Docs for SERVER-39417: [FLE] Handle c... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2019-03-11, Query 2019-03-25
Participants:

 Description   

Given the amount of code re-use, this ticket should handle the following cases:

  • Reject regex elements within a $in expression.
  • Encrypted elements within object in a $in expression
  • Encrypted elements in RHS object of comparison expressions:

    {a: {$eq: {b: 1}}}
    {a: {$gt: {b: 1}}
    ...
    

    Note that an encrypted field in a non-equality comparison should fail.

 



 Comments   
Comment by Githook User [ 15/Mar/19 ]

Author:

{'name': 'Nick Zolnierz', 'username': 'nzolnierzmdb', 'email': 'nicholas.zolnierz@mongodb.com'}

Message: SERVER-39417 Add support for $in and comparisons to objects
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/f6aab1cb3c945bf45f6e4546a0401d5a87a4439f

Comment by Nicholas Zolnierz [ 26/Feb/19 ]

I've repurposed this ticket to include SERVER-39252, as well as any RHS object in a comparison match expression as I think most of the code will be shared. The description contains the cases to consider for testing.

david.storchpawel.terlecki what do you think?

Comment by Ted Tuckman [ 25/Feb/19 ]

For the person that picks up this and SERVER-39252 – consider combining them into one commit as they may share a lot of code.

Comment by Pawel Terlecki [ 21/Feb/19 ]

nicholas.zolnierz thanks for the details. I will at this once i am done with the previous changes

Comment by Nicholas Zolnierz [ 21/Feb/19 ]

pawel.terlecki the reason this was spun out from SERVER-39233 is because it may be tricky for comparison to objects. For instance, consider the case where a.b is marked as encrypted, the following query will need to correctly mark the element:

 
db.coll.find({a: {$in: [{b: 1}]}})

The current patch for SERVER-39233 only checks the path on the LHS for encryption, nothing to do with the RHS element. Does that make sense?
 

 

Generated at Thu Feb 08 04:52:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.