[SERVER-81806] Include BinData sub-type as part of the shape? Created: 03/Oct/23 Updated: 05/Feb/24 |
|
| Status: | Open |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Backlog - Query Integration |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | quick-tech-debt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Integration
|
| Participants: |
| Description |
|
This was a question briefly raised at one point, but I don't think seriously considered. It seems like it would be a good idea and maybe give some interesting insights. |
| Comments |
| Comment by Maddie Zechar [ 08/Dec/23 ] |
|
This ticket is essentially done but need to be cleaned up in order to open a PR and the test should include every bin data subtype.
One thing to note is that if we have an array of bson bin data elements, and they're of different subtypes of bin data, then we can only really serialize as ?array<?binData> But if we have an array of bin data where the subtype is all the same say binDataFunction, we could have ?array<?binDataFunction> |
| Comment by Maddie Zechar [ 13/Nov/23 ] |
|
This ticket is still in progress and was worked on during BF days this sprint. On my branch, there is a jstest and code for checking during serializing the queryStats key if the type of arg in the command is binData and which type of binData it is.
Charlie and I also discussed that for a pipeline like {$match: {a: {$gte: new BinData(0, "1234")}, the key would have }} has a key, {}{$match: {a: {$gte: "binDataGeneral"}{}}} (as opposed to {$match: {a: }}{{{$gte: {"?binData": {type: "general"}}}} which}} adds more nesting than is true to the original query).
The work that remains to be done on this branch/ticket is changing the "?binData" to the actual binData type eg "binDataGeneral". The jstest also needs to have more test cases, eg where the key has an array that contains binData. |
| Comment by Charlie Swanson [ 05/Oct/23 ] |
|
Some context here: while this may look like a 'breaking' change, I don't think the impact will be that bad. It's probably worth warning people downstream in cloud that it's coming though (if/when we schedule it). We put this in 'quick-tech-debt' since we believe it will help track usage of deprecated bindata sub-types, to one day be a useful data point in the decision whether/when to remove support for them. |
| Comment by Charlie Swanson [ 03/Oct/23 ] |
|
moving this to triage for consideration as part of the backlog and not part of PM-2885. |