ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Overview

      DebugPrinter::print() in src/mongo/db/exec/sbe/util/debug_print.cpp emits misaligned indentation, trailing spaces, and blank lines in SBE plan and expression output.

      Problem

      • A leading backtick token removes any trailing space from the output, including the indentation written by cmdDecIndent. Closing parentheses and brackets are indented by 3 or 7 spaces instead of a multiple of 4.
      • Every line ends in a space.
      • Adjacent cmdDecIndent and cmdNewLine commands produce blank lines that still carry indentation.
      • The output of slotBasedPlan.stages and cachedPlan.stages ends with a space.

      Scope of Work

      • src/mongo/db/exec/sbe/util/debug_print.cpp - remove only spaces that belong to the current line, trim trailing whitespace at each newline and at the end of the output, and never emit a blank line.
      • src/mongo/db/exec/sbe/util/debug_print_test.cpp - new unit test.
      • Regenerate golden outputs under src/mongo/db/test_output/ and jstests/query_golden/expected_output/.
      • Update inline expectations in abt_lower_test.cpp and sbe_stage_blueprint_test.cpp.

      Acceptance Criteria

      • No line of DebugPrinter output ends in whitespace, and no line is blank.
      • Every indented line is indented by a multiple of 4 spaces.

            Assignee:
            Evan Bergeron
            Reporter:
            Evan Bergeron
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: