Implement Explain for ABT to replicate EExpression

XMLWordPrintableJSON

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

      The ExplainGenerator helper class relies on the ABT walker that visits the child nodes in a reverse order (as it places all the visitChildren in a single C++ function call, so that they are invoked in the order in which function arguments are processed, i.e. from last to first). The V3 generates something acceptable as it uses BSON structures that are correctly nested, but the V2 messes up the indentation and creates unreadable output

          ABT abt = _binary("Or", _binary("Lte", "x"_var, "2"_cint64), _cbool(false))._n;
          evaluator.optimize(abt);
          ASSERT_EXPLAIN_V2_AUTO(  // NOLINT
              "BinaryOp [Lte]\n"
              "|   Const [2]\n"
              "Variable [x]\n",
              abt);
      

      (the arguments are flipped, and "Variable [x]" should be at the same level of the "Const [2]" child)

      The task for this ticket is to have an explainer class that produce the same output as it is currently provided by EExpression::toString (e.g. in the above case, "x <= 2"), then make ASSERT_EXPLAIN_V2_AUTO use this API and update the expected results of the tests

            Assignee:
            Projjal Chanda
            Reporter:
            Alberto Massari
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: