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

Improve `EXPLAIN DESC QUERY` to show the input SQL statement

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 3.0.0
    • Component/s: SQL
    • Labels:
      None

      Description

      Currently running explain on describe query gives a little confusing output. Instead of showing the actual query that is input by the user, it shows the truncated logical plan as the input. We should improve it to show the query text as input by user.

      Here are the sample outputs of the explain command.

       

      EXPLAIN DESCRIBE WITH s AS (SELECT 'hello' as col1) SELECT * FROM s;
      == Physical Plan ==
      Execute DescribeQueryCommand
         +- DescribeQueryCommand CTE [s]
      
      EXPLAIN EXTENDED DESCRIBE SELECT * from s1 where c1 > 0;
      == Physical Plan ==
      Execute DescribeQueryCommand
         +- DescribeQueryCommand 'Project [*]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dkbiswal Dilip Biswal
                Reporter:
                dkbiswal Dilip Biswal
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: