GitHub user clockfly opened a pull request:

    https://github.com/apache/spark/pull/13471

    [SPARK-15734][SQL] Avoids printing internal row in explain output

    ## What changes were proposed in this pull request?
    
    This PR avoids printing internal rows in explain output for some operators.
    
    **Before change:**
    
    ```
    scala> (1 to 10).toSeq.map(_ => (1,2,3)).toDF().createTempView("df3")
    scala> spark.sql("select * from df3 where 1=2").explain(true)
    ...
    == Analyzed Logical Plan ==
    _1: int, _2: int, _3: int
    Project [_1#37,_2#38,_3#39]
    +- Filter (1 = 2)
       +- SubqueryAlias df3
          +- LocalRelation [_1#37,_2#38,_3#39], 
[[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3]]
    ...
    == Physical Plan ==
    LocalTableScan [_1#37,_2#38,_3#39]
    ```
    
    **After change:**
    
    ```
    scala> spark.sql("select * from df3 where 1=2").explain(true)
    ...
    == Analyzed Logical Plan ==
    _1: int, _2: int, _3: int
    Project [_1#58,_2#59,_3#60]
    +- Filter (1 = 2)
       +- SubqueryAlias df3
          +- LocalRelation [_1#58,_2#59,_3#60]
    ...
    == Physical Plan ==
    LocalTableScan Empty, [_1#58,_2#59,_3#60]
    ```
    
    ## How was this patch tested?
    Manual test.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/clockfly/spark verbose_breakdown_5

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/13471.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #13471
    
----
commit ec97fdeb354cec8adfc3a84b3c1a2216ca1ef785
Author: Sean Zhong <seanzh...@databricks.com>
Date:   2016-06-01T16:02:16Z

    improve the explain output for some primitive types...

commit 47ea0eb779cbccb5f9af1cf68fa109a6aa2c0f1e
Author: Sean Zhong <seanzh...@databricks.com>
Date:   2016-06-02T17:49:33Z

    use stringArgs so that child node can override this.

commit 8ec16840101eea9d63544d8c17594ec0ad2ae893
Author: Sean Zhong <seanzh...@databricks.com>
Date:   2016-06-02T18:07:15Z

    avoid printing internal rows.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to