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

Parse $geoNear query in DocumentSourceGeoNear constructor

    • Query Integration
    • Fully Compatible
    • 200

      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:
            alyssa.clark@mongodb.com Alyssa Clark
            Reporter:
            alyssa.clark@mongodb.com Alyssa Clark
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: