You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by davies <gi...@git.apache.org> on 2016/03/04 09:05:26 UTC

[GitHub] spark pull request: [SPARK-13671] [SQL] Use different physical pla...

GitHub user davies opened a pull request:

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

    [SPARK-13671] [SQL] Use different physical plans for RDD and data sources

    ## What changes were proposed in this pull request?
    
    This PR split the PhysicalRDD into two classes, PhysicalRDD and PhysicalScan. PhysicalRDD is used for DataFrames that is created from existing RDD. PhysicalScan is used for DataFrame that is created from data sources. This enable use to apply different optimization on both of them.
    
    ## How was this patch tested?
    
    Existing tests.
    


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

    $ git pull https://github.com/davies/spark existing_rdd

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

    https://github.com/apache/spark/pull/11514.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 #11514
    
----
commit 0e78b3afde48f1a4d2d470ee715efe1031b89882
Author: Davies Liu <da...@databricks.com>
Date:   2016-03-04T07:58:11Z

    separate physical RDD and scan

----


---
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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-193651407
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52644/
    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: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-195090277
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52855/
    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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-193651401
  
    **[Test build #52644 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52644/consoleFull)** for PR 11514 at commit [`0278fd9`](https://github.com/apache/spark/commit/0278fd94a230108c37e1e9c17365bd37b30a5288).
     * This patch **fails to build**.
     * 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 pull request: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-193648651
  
    **[Test build #2619 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2619/consoleFull)** for PR 11514 at commit [`d2d2062`](https://github.com/apache/spark/commit/d2d206249b16c1a019a294a42c3118e400a21da6).


---
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: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-194621387
  
    **[Test build #52788 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52788/consoleFull)** for PR 11514 at commit [`c4ea2e8`](https://github.com/apache/spark/commit/c4ea2e8b12fd802fd2403bbaefbbf8ab698705bb).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `case class In(attribute: String, values: Array[Any]) extends Filter `


---
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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-194568153
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52775/
    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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#discussion_r55017663
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala ---
    @@ -101,15 +101,69 @@ private[sql] case class LogicalRDD(
     private[sql] case class PhysicalRDD(
         output: Seq[Attribute],
         rdd: RDD[InternalRow],
    -    override val nodeName: String,
    -    override val metadata: Map[String, String] = Map.empty,
    -    isUnsafeRow: Boolean = false,
    -    override val outputPartitioning: Partitioning = UnknownPartitioning(0))
    +    override val nodeName: String) extends LeafNode {
    +
    +  private[sql] override lazy val metrics = Map(
    +    "numOutputRows" -> SQLMetrics.createLongMetric(sparkContext, "number of output rows"))
    +
    +  protected override def doExecute(): RDD[InternalRow] = {
    +    val numOutputRows = longMetric("numOutputRows")
    +    rdd.mapPartitionsInternal { iter =>
    +      val proj = UnsafeProjection.create(schema)
    +      iter.map { r =>
    +        numOutputRows += 1
    +        proj(r)
    +      }
    +    }
    +  }
    +
    +  override def simpleString: String = {
    +    s"RDD $nodeName${output.mkString("[", ",", "]")}"
    +  }
    +}
    --- End diff --
    
    Should we override `outputPartitioning` and set it to `UnknownPartitioning(rdd.partitions.length)`?


---
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: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-195092839
  
    **[Test build #52865 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52865/consoleFull)** for PR 11514 at commit [`b482d2c`](https://github.com/apache/spark/commit/b482d2cbf367e27cc203d89a966d0a2a053bcc35).


---
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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#discussion_r55117715
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala ---
    @@ -101,15 +101,69 @@ private[sql] case class LogicalRDD(
     private[sql] case class PhysicalRDD(
         output: Seq[Attribute],
         rdd: RDD[InternalRow],
    -    override val nodeName: String,
    -    override val metadata: Map[String, String] = Map.empty,
    -    isUnsafeRow: Boolean = false,
    -    override val outputPartitioning: Partitioning = UnknownPartitioning(0))
    +    override val nodeName: String) extends LeafNode {
    +
    +  private[sql] override lazy val metrics = Map(
    +    "numOutputRows" -> SQLMetrics.createLongMetric(sparkContext, "number of output rows"))
    +
    +  protected override def doExecute(): RDD[InternalRow] = {
    +    val numOutputRows = longMetric("numOutputRows")
    +    rdd.mapPartitionsInternal { iter =>
    +      val proj = UnsafeProjection.create(schema)
    +      iter.map { r =>
    +        numOutputRows += 1
    +        proj(r)
    +      }
    +    }
    +  }
    +
    +  override def simpleString: String = {
    +    s"RDD $nodeName${output.mkString("[", ",", "]")}"
    +  }
    +}
    --- End diff --
    
    If a partitioning is UnknownPartitioning, the number is meaningless, I think.


---
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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-193647377
  
    **[Test build #2618 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2618/consoleFull)** for PR 11514 at commit [`d2d2062`](https://github.com/apache/spark/commit/d2d206249b16c1a019a294a42c3118e400a21da6).
     * This patch **fails to build**.
     * 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 pull request: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-195121485
  
    **[Test build #52865 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52865/consoleFull)** for PR 11514 at commit [`b482d2c`](https://github.com/apache/spark/commit/b482d2cbf367e27cc203d89a966d0a2a053bcc35).
     * This patch **fails PySpark unit 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 pull request: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-192209289
  
    **[Test build #52453 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52453/consoleFull)** for PR 11514 at commit [`0e78b3a`](https://github.com/apache/spark/commit/0e78b3afde48f1a4d2d470ee715efe1031b89882).
     * This patch **fails PySpark unit 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 pull request: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-194593924
  
    **[Test build #52788 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52788/consoleFull)** for PR 11514 at commit [`c4ea2e8`](https://github.com/apache/spark/commit/c4ea2e8b12fd802fd2403bbaefbbf8ab698705bb).


---
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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-193650362
  
    **[Test build #52644 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52644/consoleFull)** for PR 11514 at commit [`0278fd9`](https://github.com/apache/spark/commit/0278fd94a230108c37e1e9c17365bd37b30a5288).


---
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: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-195606384
  
    **[Test build #52966 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52966/consoleFull)** for PR 11514 at commit [`b3d2df0`](https://github.com/apache/spark/commit/b3d2df0282f2be935e2976be39544f58e6ee3431).


---
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: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-195089833
  
    **[Test build #52855 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52855/consoleFull)** for PR 11514 at commit [`c159b25`](https://github.com/apache/spark/commit/c159b258f116c5ebf2a87dce241169425314c3ea).
     * This patch **fails PySpark unit 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 pull request: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-195090270
  
    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: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

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


---
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: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

Posted by nongli <gi...@git.apache.org>.
Github user nongli commented on the pull request:

    https://github.com/apache/spark/pull/11514#issuecomment-195132025
  
    lgtm


---
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: [SPARK-13671] [SQL] Use different physical pla...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on the pull request:

    https://github.com/apache/spark/pull/11514#issuecomment-192182579
  
    will conflict with #11509


---
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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-192174611
  
    **[Test build #52453 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52453/consoleFull)** for PR 11514 at commit [`0e78b3a`](https://github.com/apache/spark/commit/0e78b3afde48f1a4d2d470ee715efe1031b89882).


---
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: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-195630625
  
    **[Test build #52966 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52966/consoleFull)** for PR 11514 at commit [`b3d2df0`](https://github.com/apache/spark/commit/b3d2df0282f2be935e2976be39544f58e6ee3431).
     * 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 pull request: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#discussion_r55618405
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/ui/SparkPlanGraph.scala ---
    @@ -93,6 +93,10 @@ private[sql] object SparkPlanGraph {
           case "Subquery" if subgraph != null =>
             // Subquery should not be included in WholeStageCodegen
             buildSparkPlanGraphNode(planInfo, nodeIdGenerator, nodes, edges, parent, null, exchanges)
    +      case "ReusedExchange" =>
    --- End diff --
    
    This one is lost when fix conflicts in last PR.


---
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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-194568150
  
    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: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-194622009
  
    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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-193642699
  
    **[Test build #2618 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2618/consoleFull)** for PR 11514 at commit [`d2d2062`](https://github.com/apache/spark/commit/d2d206249b16c1a019a294a42c3118e400a21da6).


---
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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-194561800
  
    **[Test build #52775 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52775/consoleFull)** for PR 11514 at commit [`6cfa545`](https://github.com/apache/spark/commit/6cfa5450156ae0ad1ca4d5872dfdd2ef56a2e17b).


---
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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-193511803
  
    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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-193506060
  
    **[Test build #52610 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52610/consoleFull)** for PR 11514 at commit [`d2d2062`](https://github.com/apache/spark/commit/d2d206249b16c1a019a294a42c3118e400a21da6).


---
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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-193651406
  
    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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-194568120
  
    **[Test build #52775 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52775/consoleFull)** for PR 11514 at commit [`6cfa545`](https://github.com/apache/spark/commit/6cfa5450156ae0ad1ca4d5872dfdd2ef56a2e17b).
     * This patch **fails MiMa tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `case class In(attribute: String, values: Seq[Any]) extends Filter`


---
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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#discussion_r55002119
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala ---
    @@ -101,15 +101,69 @@ private[sql] case class LogicalRDD(
     private[sql] case class PhysicalRDD(
         output: Seq[Attribute],
         rdd: RDD[InternalRow],
    -    override val nodeName: String,
    -    override val metadata: Map[String, String] = Map.empty,
    -    isUnsafeRow: Boolean = false,
    -    override val outputPartitioning: Partitioning = UnknownPartitioning(0))
    +    override val nodeName: String) extends LeafNode {
    +
    +  private[sql] override lazy val metrics = Map(
    +    "numOutputRows" -> SQLMetrics.createLongMetric(sparkContext, "number of output rows"))
    +
    +  protected override def doExecute(): RDD[InternalRow] = {
    +    val numOutputRows = longMetric("numOutputRows")
    +    rdd.mapPartitionsInternal { iter =>
    +      val proj = UnsafeProjection.create(schema)
    +      iter.map { r =>
    +        numOutputRows += 1
    +        proj(r)
    +      }
    +    }
    +  }
    +
    +  override def simpleString: String = {
    +    s"RDD $nodeName${output.mkString("[", ",", "]")}"
    +  }
    +}
    +
    +/** Physical plan node for scanning data from a relation. */
    +private[sql] case class PhysicalScan(
    --- End diff --
    
    `DataSourceScan`?


---
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: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-195630759
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52966/
    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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-193650798
  
    **[Test build #2619 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2619/consoleFull)** for PR 11514 at commit [`d2d2062`](https://github.com/apache/spark/commit/d2d206249b16c1a019a294a42c3118e400a21da6).
     * This patch **fails to build**.
     * 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 pull request: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-192209562
  
    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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-193511757
  
    **[Test build #52610 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52610/consoleFull)** for PR 11514 at commit [`d2d2062`](https://github.com/apache/spark/commit/d2d206249b16c1a019a294a42c3118e400a21da6).
     * This patch **fails Spark unit 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 pull request: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-192209563
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52453/
    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: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-195121666
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52865/
    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: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

Posted by davies <gi...@git.apache.org>.
Github user davies commented on the pull request:

    https://github.com/apache/spark/pull/11514#issuecomment-195697416
  
    Merged into 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 pull request: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-195055222
  
    **[Test build #52855 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52855/consoleFull)** for PR 11514 at commit [`c159b25`](https://github.com/apache/spark/commit/c159b258f116c5ebf2a87dce241169425314c3ea).


---
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: [SPARK-13671] [SQL] Use different physical pla...

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

    https://github.com/apache/spark/pull/11514#issuecomment-193511806
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52610/
    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: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-194622014
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52788/
    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: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-195121664
  
    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: [SPARK-13671] [SPARK-13311] [SQL] Use differen...

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

    https://github.com/apache/spark/pull/11514#issuecomment-195630758
  
    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 pull request #11514: [SPARK-13671] [SPARK-13311] [SQL] Use different p...

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

    https://github.com/apache/spark/pull/11514#discussion_r72743160
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala ---
    @@ -101,17 +101,76 @@ private[sql] case class LogicalRDD(
     private[sql] case class PhysicalRDD(
         output: Seq[Attribute],
         rdd: RDD[InternalRow],
    -    override val nodeName: String,
    -    override val metadata: Map[String, String] = Map.empty,
    -    isUnsafeRow: Boolean = false,
    -    override val outputPartitioning: Partitioning = UnknownPartitioning(0))
    +    override val nodeName: String) extends LeafNode {
    +
    +  private[sql] override lazy val metrics = Map(
    +    "numOutputRows" -> SQLMetrics.createLongMetric(sparkContext, "number of output rows"))
    +
    +  protected override def doExecute(): RDD[InternalRow] = {
    +    val numOutputRows = longMetric("numOutputRows")
    +    rdd.mapPartitionsInternal { iter =>
    +      val proj = UnsafeProjection.create(schema)
    +      iter.map { r =>
    +        numOutputRows += 1
    +        proj(r)
    +      }
    +    }
    +  }
    +
    +  override def simpleString: String = {
    +    s"Scan $nodeName${output.mkString("[", ",", "]")}"
    +  }
    +}
    +
    +/** Physical plan node for scanning data from a relation. */
    +private[sql] case class DataSourceScan(
    +    output: Seq[Attribute],
    +    rdd: RDD[InternalRow],
    +    @transient relation: BaseRelation,
    +    override val metadata: Map[String, String] = Map.empty)
       extends LeafNode with CodegenSupport {
     
    +  override val nodeName: String = relation.toString
    +
    +  // Ignore rdd when checking results
    +  override def sameResult(plan: SparkPlan ): Boolean = plan match {
    +    case other: DataSourceScan => relation == other.relation && metadata == other.metadata
    --- End diff --
    
    this is actually wrong because we cannot ignore the rdd, otherwise scans of different partitions are treated as "sameResult"!



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