Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-85503

Add an open()-like API to DocumentSources to do non-parsing validation

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration

      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().

            Assignee:
            Unassigned Unassigned
            Reporter:
            memento@mongodb.com Memento Slack Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: