Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6330

Print the average row size when explaining an operator at the ALL_ATTRIBUTES level

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • core
    • None

    Description

      In this time, when we dump the plan of a RelNode Tree, there is no average row size exported in the output string, even if SqlExplainLevel.ALL_ATTRIBUTES is specified.

      Because the implementation in explain_() in class RelWriterImpl doesn't include the metric average_row_size: 

       

      switch (detailLevel) {
      case ALL_ATTRIBUTES:
        s.append(": rowcount = ")
            .append(mq.getRowCount(rel))
            .append(", cumulative cost = ")
            .append(mq.getCumulativeCost(rel));
      }
      switch (detailLevel) {
      case NON_COST_ATTRIBUTES:
      case ALL_ATTRIBUTES:
        if (!withIdPrefix) {
          // If we didn't print the rel id at the start of the line, print
          // it at the end.
          s.append(", id = ").append(rel.getId());
        }
        break;
      } 

       

      So I'd like to add this metric by calling md.getAverageRowSize(rel)

       

       

      Attachments

        Activity

          People

            mengdou mengdou
            mengdou mengdou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: