CanonicalQuery with pushed down $group/$lookup stages should use classic plan cache key encoding

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.0.0-rc5, 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v6.0
    • QO 2022-04-18, QO 2022-05-02
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Until SERVER-61507 is complete, any CanonicalQuery that has a pushed down $group/$lookup should use the classic canonical query encoding. However, this is currently not the case. When constructing a slot based executor and generating a plan cache key, we encode the shape of the CanonicalQuery. However, when determining whether to generate an SBE or a classic key, we do not consider whether the canonical query has a non empty pipeline. That is, we can have an SBE compatible CanonicalQuery, but incorrectly use the SBE encoding because we have a set of pushed down $group/$lookup stages. This ticket should modify CanonicalQuery::encodeKey to consider whether we have any pushed down stages when determining which encoding to use.

              Assignee:
              Alexander Ignatyev
              Reporter:
              Mihai Andrei
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: