Add missing fold optimization in SBE ABT

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2025-02-03, QE 2025-02-17
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Bonsai ConstEval was removed in SERVER-95275, the functionality should be moved to SBE ExpressionConstEval. However, some of the folding optimization is missed and some unit tests can't pass.

      1. OR operator: lhs  || true -> true, test case
      2. AND operator: lhs && false -> false, test case
      3. If-Nothing should be folded to Nothing, test case
      4. "if ( x ) then true else false" -> x, test case
      5. "if ( x ) then false else true" -> NOT x, test case
      6. "if (not ( x )) then y else z" -> "if ( x ) then z else y", test case
      7. isInList(const) folding, test case

      In above list, I put the github link to the place where logic should be added if simple to add or the original ConstEval algorithm, as well as the corresponding test cases that are not passing.

              Assignee:
              Zixuan Zhuang
              Reporter:
              Zixuan Zhuang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: