You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by wzhfy <gi...@git.apache.org> on 2017/03/28 07:54:04 UTC

[GitHub] spark pull request #17453: [SPARK-20124][SQL] Join reorder should keep the s...

GitHub user wzhfy opened a pull request:

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

    [SPARK-20124][SQL] Join reorder should keep the same order of final project attributes

    ## What changes were proposed in this pull request?
    
    Join reorder algorithm should keep exactly the same order of output attributes in the top project. 
    For example, if user want to select a, b, c, after reordering, we should output a, b, c in the same order as specified by user, instead of b, a, c or other orders.
    
    ## How was this patch tested?
    
    A new test case is added.


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

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

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

    https://github.com/apache/spark/pull/17453.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 #17453
    
----
commit 058dd7445b10a0064b3ea5114a5c70c622f02dbc
Author: wangzhenhua <wa...@huawei.com>
Date:   2017-03-28T07:06:05Z

    Keep the same order of final output attributes.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #17453: [SPARK-20124][SQL] Join reorder should keep the same ord...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/17453
  
    **[Test build #75310 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/75310/testReport)** for PR 17453 at commit [`e2249c0`](https://github.com/apache/spark/commit/e2249c03c9d79468f03744a5c4213cce8264249f).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #17453: [SPARK-20124][SQL] Join reorder should keep the same ord...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/17453
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/75310/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #17453: [SPARK-20124][SQL] Join reorder should keep the s...

Posted by wzhfy <gi...@git.apache.org>.
Github user wzhfy commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17453#discussion_r108392855
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala ---
    @@ -127,7 +127,8 @@ abstract class PlanTest extends SparkFunSuite with PredicateHelper {
             (sameJoinPlan(j1.left, j2.left) && sameJoinPlan(j1.right, j2.right)) ||
               (sameJoinPlan(j1.left, j2.right) && sameJoinPlan(j1.right, j2.left))
           case _ if plan1.children.nonEmpty && plan2.children.nonEmpty =>
    -        (plan1.children, plan2.children).zipped.forall { case (c1, c2) => sameJoinPlan(c1, c2) }
    +        plan1 == plan2 &&
    --- End diff --
    
    Yes you are right. There's some confusion here.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #17453: [SPARK-20124][SQL] Join reorder should keep the same ord...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/17453
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #17453: [SPARK-20124][SQL] Join reorder should keep the same ord...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/17453
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #17453: [SPARK-20124][SQL] Join reorder should keep the s...

Posted by wzhfy <gi...@git.apache.org>.
Github user wzhfy commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17453#discussion_r108391785
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala ---
    @@ -127,7 +127,8 @@ abstract class PlanTest extends SparkFunSuite with PredicateHelper {
             (sameJoinPlan(j1.left, j2.left) && sameJoinPlan(j1.right, j2.right)) ||
               (sameJoinPlan(j1.left, j2.right) && sameJoinPlan(j1.right, j2.left))
           case _ if plan1.children.nonEmpty && plan2.children.nonEmpty =>
    -        (plan1.children, plan2.children).zipped.forall { case (c1, c2) => sameJoinPlan(c1, c2) }
    +        plan1 == plan2 &&
    --- End diff --
    
    It compares the two plans themselves, e.g. I also want to make sure projectLists are equal in Project nodes. Subtree comparison is done by recursively calling `sameJoinPlan` for their child/children.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #17453: [SPARK-20124][SQL] Join reorder should keep the same ord...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/17453
  
    **[Test build #75305 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/75305/testReport)** for PR 17453 at commit [`058dd74`](https://github.com/apache/spark/commit/058dd7445b10a0064b3ea5114a5c70c622f02dbc).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #17453: [SPARK-20124][SQL] Join reorder should keep the s...

Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17453#discussion_r108389791
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala ---
    @@ -127,7 +127,8 @@ abstract class PlanTest extends SparkFunSuite with PredicateHelper {
             (sameJoinPlan(j1.left, j2.left) && sameJoinPlan(j1.right, j2.right)) ||
               (sameJoinPlan(j1.left, j2.right) && sameJoinPlan(j1.right, j2.left))
           case _ if plan1.children.nonEmpty && plan2.children.nonEmpty =>
    -        (plan1.children, plan2.children).zipped.forall { case (c1, c2) => sameJoinPlan(c1, c2) }
    +        plan1 == plan2 &&
    --- End diff --
    
    Why should they be equal? This implies that the entire subree is the same as well right?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #17453: [SPARK-20124][SQL] Join reorder should keep the same ord...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/17453
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/75305/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #17453: [SPARK-20124][SQL] Join reorder should keep the s...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #17453: [SPARK-20124][SQL] Join reorder should keep the same ord...

Posted by wzhfy <gi...@git.apache.org>.
Github user wzhfy commented on the issue:

    https://github.com/apache/spark/pull/17453
  
    cc @cloud-fan please review


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #17453: [SPARK-20124][SQL] Join reorder should keep the same ord...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/17453
  
    LGTM, merging to master!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #17453: [SPARK-20124][SQL] Join reorder should keep the same ord...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/17453
  
    **[Test build #75305 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/75305/testReport)** for PR 17453 at commit [`058dd74`](https://github.com/apache/spark/commit/058dd7445b10a0064b3ea5114a5c70c622f02dbc).
     * This patch **fails from timeout after a configured wait of \`250m\`**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #17453: [SPARK-20124][SQL] Join reorder should keep the same ord...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/17453
  
    **[Test build #75310 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/75310/testReport)** for PR 17453 at commit [`e2249c0`](https://github.com/apache/spark/commit/e2249c03c9d79468f03744a5c4213cce8264249f).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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