GitHub user viirya opened a pull request:

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

    [SPARK-13771][SQL] Eliminate child from project if the project with no 
references to its child

    JIRA: https://issues.apache.org/jira/browse/SPARK-13771
    
    ## What changes were proposed in this pull request?
    
    This is a corner case that a `Project` node can have no references to its 
child. E.g.,
    
        val input = LocalRelation('key.int, 'value.string)
        Project(Literal(1).as("1") :: Nil, input)
    
    We can actually replace the input with a dummy `OneRowRelation`.
    
    This PR is inspired by #11599. The test case is slightly modified from 
#11599 too.
    
    ## How was this patch tested?
    
    `ColumnPruningSuite`.


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

    $ git pull https://github.com/viirya/spark-1 eliminate-no-use

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

    https://github.com/apache/spark/pull/11602.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 #11602
    
----
commit 9500b461ee63504ddf393fe536da04c016ef4de1
Author: Liang-Chi Hsieh <[email protected]>
Date:   2016-03-09T07:57:01Z

    Eliminate child from project if the project with no references to its child.

----


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