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

Parse $geoNear query in DocumentSourceGeoNear constructor

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

      We should consider using MatchExpressionParser to parse the query argument to $geoNear when creating the document source, for validation purposes. Currently (at least on some queries), this doesn't happen in normal parsing code until deep within PipelineD::buildInnerQueryExecutorGeoNear.
      The interesting plot twist is that DocumentSourceGeoNear::serialize calls MatchExpressionParser::parse when serializing for PQS or query stats. This leads to weird cases where query stats sees parsing/validation errors after a query has technically been parsed (see here for more details). 

       
      Once we make this change we can re-enable jstests/core/query/json_schema/misc_validation.js 
      in the query stats core passthroughs. 

            Assignee:
            Unassigned Unassigned
            Reporter:
            alyssa.clark@mongodb.com Alyssa Clark
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: