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

Improved MatchExpression equivalence checking

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

      Our current MatchExpression:equivalent comparison is deficient in a number of ways. It intentionally performs a simple, direct comparison between trees that does not attempt to account for predicate order or other similar differences, but can fail to identify equivalent trees even in cases where both have been optimized and sorted. SERVER-47661 is intended to address the latter, but we should make further efforts to improvement MatchExpression equivalence checking where possible.

      For instance, we require that the collators of both trees match when checking the equivalence of comparison predicates, but then neglect to take collation into account when checking whether string predicates are equivalent. Under a case-insensitive collation, for example, a predicate {a:"blah"} would match the same set of documents as {a:"BLAH"}, and so these should be considered equivalent. Currently, however, the predicates are are always evaluated using simple binary comparison, and so these two predicates will always be considered different from each other.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            bernard.gorman@mongodb.com Bernard Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: