GitHub user wzhfy opened a pull request:

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

    [SPARK-17080][SQL][followup] simplify algorithm

    
    ## What changes were proposed in this pull request?
    
    1. Do column pruning during reordering is troublesome. We can do it right 
after reordering, then logics for adding projects on intermediate joins can be 
removed. This makes the code simpler and more reliable.
    2. Usually cardinality is more important than size, we can simplify cost 
evaluation by using only cardinality. Note that this enables us to not care 
about column pruing during reordering (the first point). Otherwise, project 
will influence the output size of intermediate joins.
    3. Exclude cartesian products in the "memo". This significantly reduce the 
search space. Otherwise every combination of items will exist in the memo.  We 
can find those unjoinable items after reordering is finished and put them at 
the end.
    
    ## How was this patch tested?
    
    Not related.


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

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

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

    https://github.com/apache/spark/pull/17240.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 #17240
    
----
commit 94bc9355b647f181549c8a11d77b00237ea4c528
Author: wangzhenhua <[email protected]>
Date:   2017-03-10T08:33:46Z

    1.don't deal with projects during reordering 2.exclude cartesian products 
during reordering 3.only use cardinality as cost.

----


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