[SERVER-22473] Parsing invalid geo match predicate should not generate exception Created: 04/Feb/16  Updated: 25/May/21  Resolved: 30/Mar/21

Status: Closed
Project: Core Server
Component/s: Geo, Querying
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Improvement Priority: Major - P3
Reporter: J Rassi Assignee: Joshua Lapacik (Inactive)
Resolution: Done Votes: 0
Labels: neweng, query-44-grooming
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes SERVER-56928 Fix bug with findOne() query that use... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query Optimization 2021-04-05
Participants:

 Description   

The return type of MatchExpressionParser::parse() is StatusWith<std::unique_ptr<MatchExpression>>, but a UserException is thrown from this method when given an invalid geo near predicate (see GeoNearExpression::parseLegacyQuery(), GeoNearExpression::parseNewQuery(), and GeoNearExpression::parseFrom()).

Instead, an error Status should be returned.



 Comments   
Comment by Githook User [ 30/Mar/21 ]

Author:

{'name': 'joshua', 'email': '80741223+jlap199@users.noreply.github.com', 'username': 'jlap199'}

Message: SERVER-22473 Return error status when parsing GeoNear exrpession instead of exception
Branch: master
https://github.com/mongodb/mongo/commit/6540ab6ffcd68bd8763b7f6afeb16f56770ad669

Comment by Joshua Lapacik (Inactive) [ 25/Mar/21 ]

rassi can you give an example of an invalid predicate that throws this exception?

Generated at Thu Feb 08 04:00:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.