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

Call "MatchExpression::optimize()" on collection validator expressions

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

      Currently, collection validator expressions are not optimized. In theory, it would not be a breaking change to optimize these expressions as MatchExpression::optimize() produces a semantically equivalent expression. However, some work would need to be done to ensure that validation error generation works properly when optimize() gets called. More precisely, we would need to store two copies of the MatchExpression: the original and the optimized one. While the optimized one would be used for matching, the unoptimized one would be used to produce detailed validation errors. This extra copy of the original is necessary because the optimized expression is not guaranteed to match the original shape of the user-specified validator expression and would potentially produce an incorrect error.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            mihai.andrei@mongodb.com Mihai Andrei
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: