[SERVER-85503] Add an open()-like API to DocumentSources to do non-parsing validation Created: 19/Jan/24 Updated: 25/Jan/24 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Memento Slack Bot | Assignee: | Backlog - Query Integration |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | qi-tech-debt, query-skunkworks | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Query Integration
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
There's been a couple examples (linked to this ticket) of DocumentSources having validation code inside their parsers which isn't really about parsing. This makes it hard to build an AST that you don't intend to execute, as we did in query stats. The SBE system has the concept of calling "open" before you call "getNext", and I think this would be a good paradigm to solve this problem. There are already many stages with a sort of "bool _initialized" tracking stuff to do on the first call to getNext(). |
| Comments |
| Comment by Alyssa Clark [ 25/Jan/24 ] |
|
Once we do this, we should look into whether we can remove some of the checks for the StubMongoProcessInterface (see SERVER-79508) that we had to add because validation was being done at parse time rather than execution time. |