You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by rxin <gi...@git.apache.org> on 2017/05/24 12:58:30 UTC

[GitHub] spark pull request #18087: [SPARK-20867][SQL] Move hints from Statistics int...

GitHub user rxin opened a pull request:

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

    [SPARK-20867][SQL] Move hints from Statistics into HintInfo class

    ## What changes were proposed in this pull request?
    This is a follow-up to SPARK-20857 to move the broadcast hint from Statistics into a new HintInfo class, so we can be more flexible in adding new hints in the future.
    
    ## How was this patch tested?
    Updated test cases to reflect the change.

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

    $ git pull https://github.com/rxin/spark SPARK-20867

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

    https://github.com/apache/spark/pull/18087.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 #18087
    
----
commit 19232cfc8ad54229b73fce4792c8b4c6d3d72495
Author: Reynold Xin <rx...@databricks.com>
Date:   2017-05-24T12:57:36Z

    [SPARK-20867][SQL] Move individual hints from Statistics into HintInfo class

----


---
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 #18087: [SPARK-20867][SQL] Move hints from Statistics into HintI...

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

    https://github.com/apache/spark/pull/18087
  
    **[Test build #77301 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77301/testReport)** for PR 18087 at commit [`19232cf`](https://github.com/apache/spark/commit/19232cfc8ad54229b73fce4792c8b4c6d3d72495).


---
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 #18087: [SPARK-20867][SQL] Move hints from Statistics into HintI...

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

    https://github.com/apache/spark/pull/18087
  
    Thanks! Merging to master/2.2. 


---
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 #18087: [SPARK-20867][SQL] Move hints from Statistics int...

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

    https://github.com/apache/spark/pull/18087#discussion_r118362491
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala ---
    @@ -195,9 +195,9 @@ case class Intersect(left: LogicalPlan, right: LogicalPlan) extends SetOperation
         val leftSize = left.stats(conf).sizeInBytes
         val rightSize = right.stats(conf).sizeInBytes
         val sizeInBytes = if (leftSize < rightSize) leftSize else rightSize
    -    val isBroadcastable = left.stats(conf).isBroadcastable || right.stats(conf).isBroadcastable
    -
    -    Statistics(sizeInBytes = sizeInBytes, isBroadcastable = isBroadcastable)
    +    Statistics(
    +      sizeInBytes = sizeInBytes,
    +      hints = left.stats(conf).hints.resetForJoin())
    --- End diff --
    
    uh, 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 pull request #18087: [SPARK-20867][SQL] Move hints from Statistics int...

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

    https://github.com/apache/spark/pull/18087#discussion_r118353924
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala ---
    @@ -195,9 +195,9 @@ case class Intersect(left: LogicalPlan, right: LogicalPlan) extends SetOperation
         val leftSize = left.stats(conf).sizeInBytes
         val rightSize = right.stats(conf).sizeInBytes
         val sizeInBytes = if (leftSize < rightSize) leftSize else rightSize
    -    val isBroadcastable = left.stats(conf).isBroadcastable || right.stats(conf).isBroadcastable
    -
    -    Statistics(sizeInBytes = sizeInBytes, isBroadcastable = isBroadcastable)
    +    Statistics(
    +      sizeInBytes = sizeInBytes,
    +      hints = left.stats(conf).hints.resetForJoin())
    --- End diff --
    
    It's actually no-op since Intersect is rewritten to a join always ..


---
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 #18087: [SPARK-20867][SQL] Move hints from Statistics into HintI...

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

    https://github.com/apache/spark/pull/18087
  
    **[Test build #77301 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/77301/testReport)** for PR 18087 at commit [`19232cf`](https://github.com/apache/spark/commit/19232cfc8ad54229b73fce4792c8b4c6d3d72495).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `case class ResolvedHint(child: LogicalPlan, hints: HintInfo = HintInfo())`
      * `case class HintInfo(`


---
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 #18087: [SPARK-20867][SQL] Move hints from Statistics into HintI...

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

    https://github.com/apache/spark/pull/18087
  
    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 #18087: [SPARK-20867][SQL] Move hints from Statistics into HintI...

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

    https://github.com/apache/spark/pull/18087
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77301/
    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 #18087: [SPARK-20867][SQL] Move hints from Statistics into HintI...

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

    https://github.com/apache/spark/pull/18087
  
    LGTM except one comment.


---
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 #18087: [SPARK-20867][SQL] Move hints from Statistics int...

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

    https://github.com/apache/spark/pull/18087#discussion_r118351827
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala ---
    @@ -195,9 +195,9 @@ case class Intersect(left: LogicalPlan, right: LogicalPlan) extends SetOperation
         val leftSize = left.stats(conf).sizeInBytes
         val rightSize = right.stats(conf).sizeInBytes
         val sizeInBytes = if (leftSize < rightSize) leftSize else rightSize
    -    val isBroadcastable = left.stats(conf).isBroadcastable || right.stats(conf).isBroadcastable
    -
    -    Statistics(sizeInBytes = sizeInBytes, isBroadcastable = isBroadcastable)
    +    Statistics(
    +      sizeInBytes = sizeInBytes,
    +      hints = left.stats(conf).hints.resetForJoin())
    --- End diff --
    
    We don't propagate `isBroadcastable` Hints in `Intersect`? 


---
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 #18087: [SPARK-20867][SQL] Move hints from Statistics into HintI...

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

    https://github.com/apache/spark/pull/18087
  
    cc @hvanhovell, @bogdanrdc 


---
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 #18087: [SPARK-20867][SQL] Move hints from Statistics int...

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

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


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