[JAVA-4823] Optimize: generated get and set field MQL Created: 01/Dec/22  Updated: 01/Jun/23

Status: Backlog
Project: Java Driver
Component/s: Builders
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Maxim Katcharov Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Quarter: FY23Q4

 Description   

When setting or getting fields in our expressions API, the resulting MQL is verbose, since it produces $getField and $setField MQL. 

  • It should be possible to use a post-processor to collapse some of these into simple string paths. 
  • For literal documents, it should be possible to execute the gets and sets in the "local execution context" (storing and producing a new internal document each time, rather than generating composite expressions that wrap the original literal document).


 Comments   
Comment by Tim van Dijk [ 01/Jun/23 ]

Hi, I would classify this as a bug, as it prevents users who are not yet on server version 5.0 (which $getField requires) from using the MQL library. I'm blocked by this, and forced to handcraft my query.

See also: https://jira.mongodb.org/browse/CSHARP-4140, similar issue for the C# version.

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