GitHub user wzhfy opened a pull request:

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

    [SPARK-18911] [SQL] Define CatalogStatistics to interact with metastore and 
convert it to Statistics based on cbo switch

    
    ## What changes were proposed in this pull request?
    
    Statistics in LogicalPlan should use attributes to refer to columns rather 
than column names, because two columns from two relations can have the same 
column name. But CatalogTable doesn't have the concepts of attribute or 
broadcast hint in Statistics. Therefore, putting Statistics in CatalogTable is 
confusing.
    
    We define a different statistic structure in CatalogTable, which is only 
responsible for interacting with metastore, and is converted to statistics in 
LogicalPlan when it is used.
    
    We also add a switch in conf to enable or disable the CatalogStatistics to 
be converted into statistics in LogicalPlan (LeafNode Relations).
    
    ## How was this patch tested?
    
    add test cases

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

    $ git pull https://github.com/wzhfy/spark nameToAttr

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

    https://github.com/apache/spark/pull/16323.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 #16323
    
----
commit d1679a3b1570dad08107e19d95c6cbdb52c4d942
Author: Zhenhua Wang <[email protected]>
Date:   2016-12-17T04:46:03Z

    use CatalogStatistics to interact with metastore and convert it to 
Statistics based on cbo switch

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to