-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
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.
- is duplicated by
-
SERVER-94819 Audit query stats passthrough test failures from serialize() side effects
- Closed
- related to
-
SERVER-94819 Audit query stats passthrough test failures from serialize() side effects
- Closed
-
SERVER-96515 Validate $merge whenMatched pipeline before execution time
- Backlog