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

Implement proper semantics for matching missing of some terminals on the path

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • QE 2022-04-04

      For SERVER-63690 I'm implementing the basic path handling that does not match the current semantics of the classic engine (see SERVER-64060).

      The problem here is to distinguish between the set of key values that was empty due to a path that didn't traverse any arrays but resulted in missing (in classical it matches to null), vs a path that traversed arrays and all terminals were missing (in classical it matches to null because an empty array matches to null), vs a path that traverses arrays and some terminals are missing and others aren't (in classical this does not match to null), vs all terminals being empty arrays (per SERVER-63368 classical will produce no matches in this case)

      In SBE it's easy to implement either:
      1. Treat any missing terminal as null and match records with such terminals to null/missing (this will match to null when some of the terminals are missing but not all)
      2. For empty set of key values (because neither of the terminals produced a non-missing value) produce no matches (this won't match to null a path with no arrays that terminates in missing)
      3. Match empty set of key values (because neither of the terminals produced a non-missing value) to null (this will match to null empty arrays).

            Assignee:
            irina.yatsenko@mongodb.com Irina Yatsenko (Inactive)
            Reporter:
            irina.yatsenko@mongodb.com Irina Yatsenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: