Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-5817

After sending the query, the number of scanRows and scanBytes in response are inaccurate

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 5.0-beta
    • 5.0.0
    • Query Engine
    • None

    Description

      Background

      When KE calls the query interface, it is found that the scan row count scanRows and scan byte count scanBytes in the response are not accurate.

      Root Cause

      The query interface internally calls the collectAdaptiveSparkPlanExecMetrics method of QueryMetricUtils. When iterating through exec.children.foreach, if the child is a SparkPlan, each time the results of the new child overwrite the newScanRow and newScanBytes variables without adding them up.

      Dev Design

      To address the issue, replace the assignment operator = with the compound addition assignment operator += to ensure that the results are properly accumulated. This change will allow for the correct aggregation of scan row count and scan byte count in each iteration.

      Attachments

        Activity

          People

            Jueyi Zhimin Wu
            Jueyi Zhimin Wu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: