Parse $geoNear query in DocumentSourceGeoNear constructor

XMLWordPrintableJSON

    • Query Integration
    • Fully Compatible
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
              Reporter:
              Alyssa Clark
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: