Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-38322

Support query stage show runtime statistics in formatted explain mode

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.3.0
    • SQL
    • None

    Description

      The formatted explalin mode is the powerful explain mode to show the details of query plan. In AQE, the query stage know its statistics if has already materialized. So it can help to quick check the conversion of plan, e.g. join selection. 

      A simple example:

      SELECT * FROM t JOIN t2 ON t.c = t2.c;

       

      == Physical Plan ==
      AdaptiveSparkPlan (21)
      +- == Final Plan ==
         * SortMergeJoin Inner (13)
         :- * Sort (6)
         :  +- AQEShuffleRead (5)
         :     +- ShuffleQueryStage (4), Statistics(sizeInBytes=16.0 B, rowCount=1)
         :        +- Exchange (3)
         :           +- * Filter (2)
         :              +- Scan hive default.t (1)
         +- * Sort (12)
            +- AQEShuffleRead (11)
               +- ShuffleQueryStage (10), Statistics(sizeInBytes=16.0 B, rowCount=1)
                  +- Exchange (9)
                     +- * Filter (8)
                        +- Scan hive default.t2 (7)
      +- == Initial Plan ==
         SortMergeJoin Inner (20)
         :- Sort (16)
         :  +- Exchange (15)
         :     +- Filter (14)
         :        +- Scan hive default.t (1)
         +- Sort (19)
            +- Exchange (18)
               +- Filter (17)
                  +- Scan hive default.t2 (7)

       

       

      Attachments

        Activity

          People

            ulysses XiDuo You
            ulysses XiDuo You
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: