[SERVER-63840] mqlrun yields inconsistent with mongod when field name is empty Created: 18/Feb/22  Updated: 06/Dec/22  Resolved: 01/Mar/22

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

Type: Bug Priority: Major - P3
Reporter: Shakil Rafi Assignee: Backlog - Query Execution
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File empty_field_names.bson    
Assigned Teams:
Query Execution
Operating System: ALL
Steps To Reproduce:

$ ./mqlrun -j -e '[]' empty_field_names.bson # this bson file is attached

{ a: 1 }

{ : 1 }
{ : 2 }

$ ./mqlrun -j -e '[{$match: {"":1}}]' empty_field_names.bson # no results

 

$ ./mqlrun -j -e '[{$match: {"a":1}}]' empty_field_names.bson

{ a: 1 }
Participants:

 Description   

The empty string ("") is a valid field name in MongoDB and a user can query off of it using a match pipeline stage when running on a mongod. However, if a document is passed to mqlrun with the empty string as a field name, then that field is effectively ignored, rather than queried off of.

This was discovered while investigating a fix for MHOUSE-3552.



 Comments   
Comment by Ana Meza [ 01/Mar/22 ]

As discussed in Query Triage we will not be prioritizing this change in behavior 

Generated at Thu Feb 08 05:58:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.