GitHub user tejasapatil opened a pull request:

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

    [SPARK-20487][SQL] Display `serde` for `HiveTableScan` node in explained 
plan

    ## What changes were proposed in this pull request?
    
    This was a suggestion by @rxin at 
https://github.com/apache/spark/pull/17780#issuecomment-298073408
    
    ## How was this patch tested?
    
    - modified existing unit test
    - manual testing:
    
    ```
    scala> hc.sql(" SELECT * FROM my_table  where name = ''  ").explain(true)
    == Parsed Logical Plan ==
    'Project [*]
    +- 'Filter ('name = )
       +- 'UnresolvedRelation `my_table`
    
    == Analyzed Logical Plan ==
    user_id: bigint, name: string, ds: string
    Project [user_id#13L, name#14, ds#15]
    +- Filter (name#14 = )
       +- SubqueryAlias my_table
          +- CatalogRelation `default`.`my_table`, 
Some(org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe), [user_id#13L, 
name#14], [ds#15]
    
    == Optimized Logical Plan ==
    Filter (isnotnull(name#14) && (name#14 = ))
    +- CatalogRelation `default`.`my_table`, 
Some(org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe), [user_id#13L, 
name#14], [ds#15]
    
    == Physical Plan ==
    *Filter (isnotnull(name#14) && (name#14 = ))
    +- HiveTableScan [user_id#13L, name#14, ds#15], CatalogRelation 
`default`.`my_table`, Some(org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe), 
[user_id#13L, name#14], [ds#15]
    ```

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

    $ git pull https://github.com/tejasapatil/spark add_serde

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

    https://github.com/apache/spark/pull/17806.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 #17806
    
----
commit ffaec4d077198e742570e98b9dc080afb1d0a316
Author: Tejas Patil <tej...@fb.com>
Date:   2017-04-28T20:48:15Z

    [SPARK-20487][SQL] Display `serde` for `HiveTableScan` node in explained 
plan

----


---
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