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

[SBE] find() should apply most operators to both array field's elements and array itself

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Querying
    • Fully Compatible
    • ALL

      When working on implementing SBE support for the $type operator, I noticed that I was getting wrong results in some cases because for array fields generateTraverseHelper() in "sbe_stage_builder_filter.cpp" was only applying predicates to the array's elements but not the array itself. After doing more research, I realized that this issue was also something that will come up for the comparison operators ($eq, $lt, $gt, etc.) once we update the genericCompare*() functions to support arrays.

      The goal of this task is to update generateTraverseHelper() in "sbe_stage_builder_filter.cpp" so that for array fields the predicate is applied to both the array's elements and the array itself.

            Assignee:
            andrew.paroski@mongodb.com Drew Paroski
            Reporter:
            andrew.paroski@mongodb.com Drew Paroski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: