[SERVER-58259] Add method to stitch support lib to return list of fields in a query Created: 02/Jul/21  Updated: 06/Oct/23

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

Type: New Feature Priority: Major - P3
Reporter: Kiro Morkos Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Execution
Participants:

 Description   

We'd like a method exposed in the stitch support library that returns a list of fields in a given query.

i.e. given

{
  $and: [
    { $or: [ { field1: { $lt : 10 }, { field2: { $in: [50, 30] } ] },
    { $or: [ { field3: "abc" }, { field2: { $gt : 5 } ] }
  ]
}

it would return

[field1, field2, field3]



 Comments   
Comment by Felipe Gasper [ 04/Oct/23 ]

Of note: mongoast implements this functionality. It doesn’t handle all cases—things like $$ROOT can confuse it—but for mongosync’s purposes that may still be fine.

Comment by Eric Sedor [ 07/Jul/21 ]

kiro.morkos, mpobrien, my apologies for misunderstanding. I've reopened this ticket and we'll get it routed. Thank you!

Comment by Michael O'Brien [ 06/Jul/21 ]

eric.sedor this ticket is in reference to the stitch support library, which is part of the server codebase (see https://github.com/mongodb/mongo/tree/master/src/mongo/embedded/stitch_support) which is consumed by Realm, and this is a feature request that would be helpful to us. Can you please reopen this?

Comment by Eric Sedor [ 06/Jul/21 ]

Hi kiro.morkos,

The SERVER project is for bugs and feature suggestions for the MongoDB server. To inform our Atlas team of issues you are having or feature requests you'd like to suggest, please reach out to the Atlas support team via Intercom. You can do this by clicking the round green button at the bottom right of the cluster view page in Atlas.

Sincerely,
Eric

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