[SERVER-67517] [CQF] Queries with field path references fail if they contain a dot, dollar, or empty field Created: 24/Jun/22  Updated: 29/Oct/23  Resolved: 01/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

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

Backwards Compatibility: Fully Compatible
Sprint: QO 2022-07-25, QO 2022-08-08, QO 2022-08-22, QO 2022-09-05, QO 2022-09-19, QO 2022-10-03, QE 2022-10-17
Participants:

 Description   

This bug is relevant only for CQF/bonsai. Since the ABT translation layer relies on FieldPath (e.g. here), the restrictions on field names are different than the existing find/agg systems.

As an example, the following query should work:

assert.commandWorked(coll.insert({a: {$b: 1}}));
assert.eq(1, coll.find({"a.$b": 1}).itcount());

But instead throws with ""FieldPath field names may not start with '$'. Consider using $getField or $setField."

At least two relevant JS tests are field_name_empty.js and field_name_validation.js.



 Comments   
Comment by Githook User [ 31/Oct/22 ]

Author:

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

Message: SERVER-67517 [CQF] Support field path references with dots, dollars, and empty
Branch: master
https://github.com/mongodb/mongo/commit/2c45df846c8cf7b02f845e0d0ede0aef059cf60e

Comment by Hana Pearlman [ 19/Aug/22 ]

Moving back to open with Steve transitioning off the project.

Generated at Thu Feb 08 06:08:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.