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

$bucketAuto should optimize its expressions

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

      In SERVER-45447 we found that $bucketAuto does not override the optimize() method, which means expressions inside a $bucketAuto were not being constant-folded.  We've fixed this in 4.4.

      This has caused us to lose some test coverage, because queries using $bucketAuto in 4.2 vs 4.4 can return different results.  A lot of the cases involve one query erroring and the other not, but some cases may involve two slightly different results.

      Giving $bucketAuto an optimize() method on 4.2 would be a small code change, would make some queries faster, and would make our 4.4 tests greener.  But it could also cause subtle behavior changes.

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: