[SERVER-51204] Refactor numeric type conversion out of BSON Created: 28/Sep/20  Updated: 15/May/21  Resolved: 11/May/21

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

Type: Task Priority: Major - P3
Reporter: George Wangensteen Assignee: Jacob Evans
Resolution: Won't Fix Votes: 0
Labels: qopt-team, quick-tech-debt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-56864 Complete TODO listed in SERVER-51204 Closed
related to SERVER-56986 Complete TODO listed in SERVER-51204 Closed
Sprint: Query 2020-11-30, Query 2020-12-14, Query 2020-12-28, Query 2021-01-11, Query 2021-01-25, Query Optimization 2021-02-22, Query Optimization 2021-03-08, Query Optimization 2021-03-22, Query Optimization 2021-04-05, Query Optimization 2021-04-19, Query Optimization 2021-05-03, Query Optimization 2021-05-17
Participants:

 Description   

The existing query parsing system uses member functions on the BSON objects/elements representing the query to perform numeric type conversion when necessary as it builds the MatchExpression tree or pipeline.

With the new CST + bison-based parser, we ideally remove the need for BSON at the initial parse, but often need to do type conversion afterwords (like during validation and translation). This means that to ensure we're doing conversions identically to the old code, we need to recreate temporary BSONObjs, which is annoying and has allocation overhead .

When we get a chance, we should refactor the type-conversion operators on the BSON currently used in parsing to make them independent of the BSON (possibly as a library of free functions, allowing them to be used independently of BSON and to have the existing BSON methods delegate to them).

cc jacob.evans david.percy



 Comments   
Comment by Jacob Evans [ 11/May/21 ]

We were unable to find a refactoring that seemed like enough of an improvement to the status quo.

Comment by Charlie Swanson [ 28/Jan/21 ]

jacob.evans this continues to crop up on our boards. Can we reassign to the backlog? Or if you're worried about losing it we can remove the 'quick-tech-debt' label and park it in some sprint way in the future, still assigned to you.

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