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

Investigate correctness of comparison semantics in SBE

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Execution

      Aggregation comparison expressions in SBE are implemented using cmp3w VM instruction. This instruction does not have a well defined semantics behind it. It does not implement MQL comparison or WO comparison. This leads to a situation where passing all comparison operators tests is not enough because we do not have any guarantee on the behaviour in some extreme cases (for instance, comparing special values like NaN, Inf and undefined).

      To fix that, we should:

      • Strictly define semantics for cmp3w
      • Ensure that other comparison instructions (less, eq, etc.) have MQL semantics
      • Add an exhaustive test which ensure the behaviour of all find/aggregation comparison operators on various types (including special values)

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            nikita.lapkov@mongodb.com Nikita Lapkov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: