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

geo serialization function doesn't consider inputs of the form {x:0, y:0, maxDist:1}

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • Fully Compatible
    • ALL
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      A user can input a query such as 

      db.coll.find({ loc: { $near:  {$geometry: 1 ,y: 327391, z: 1} } })

      where this is treated as a legacy style query, where the the point is taken to be 1, 327391 and 1 is the distance. See GeoParser::parsePointWithMaxDistance()

      However, the serialization function for geo doesn't consider this to be a valid option and only considers legacy coordinate pairs, and not triplets. This may only affect query stats and debugging since we only use the serialization function when the policy is not LiteralSerializationPolicy::kUnchanged. Query stats errors since the serialization function will check for [x,y] pair, and then when its not found, will go through $geometry serialization. But [x,y,z] all be numbers is also valid. 

       

            Assignee:
            erin.zhu@mongodb.com Erin Zhu
            Reporter:
            erin.zhu@mongodb.com Erin Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None