You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by rednaxelafx <gi...@git.apache.org> on 2018/03/21 05:06:38 UTC

[GitHub] spark pull request #20870: [SPARK-23760][SQL]: CodegenContext.withSubExprEli...

GitHub user rednaxelafx opened a pull request:

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

    [SPARK-23760][SQL]: CodegenContext.withSubExprEliminationExprs should save/restore CSE state correctly

    ## What changes were proposed in this pull request?
    
    Fixed `CodegenContext.withSubExprEliminationExprs()` so that it saves/restores CSE state correctly.
    
    ## How was this patch tested?
    
    Added new unit test to verify that the old CSE state is indeed saved and restored around the `withSubExprEliminationExprs()` call. Manually verified that this test fails without this patch.

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

    $ git pull https://github.com/rednaxelafx/apache-spark codegen-subexpr-fix

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

    https://github.com/apache/spark/pull/20870.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 #20870
    
----

----


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

    https://github.com/apache/spark/pull/20870
  
    good catch! merging to master/2.3!
    
    also cc @viirya 


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

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


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

    https://github.com/apache/spark/pull/20870
  
    **[Test build #88448 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88448/testReport)** for PR 20870 at commit [`8635969`](https://github.com/apache/spark/commit/863596956ced94c49289c9eaeebf544b2de68f15).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

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


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

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


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

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


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL]: CodegenContext.withSubExprEliminatio...

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

    https://github.com/apache/spark/pull/20870
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/1663/
    Test PASSed.


---

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


[GitHub] spark pull request #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElim...

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

    https://github.com/apache/spark/pull/20870#discussion_r175986986
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala ---
    @@ -942,7 +940,7 @@ class CodegenContext {
       def subexpressionEliminationForWholeStageCodegen(expressions: Seq[Expression]): SubExprCodes = {
         // Create a clear EquivalentExpressions and SubExprEliminationState mapping
         val equivalentExpressions: EquivalentExpressions = new EquivalentExpressions
    -    val subExprEliminationExprs = mutable.HashMap.empty[Expression, SubExprEliminationState]
    +    val localSubExprEliminationExprs = mutable.HashMap.empty[Expression, SubExprEliminationState]
    --- End diff --
    
    This renaming isn't necessary for the fix per-se, but I'd like to piggyback it on this change so that it's clearer that we're not interfering with the current CSE state of this CodegenContext here.


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL]: CodegenContext.withSubExprEliminatio...

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

    https://github.com/apache/spark/pull/20870
  
    **[Test build #88448 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88448/testReport)** for PR 20870 at commit [`8635969`](https://github.com/apache/spark/commit/863596956ced94c49289c9eaeebf544b2de68f15).


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

    https://github.com/apache/spark/pull/20870
  
    **[Test build #88449 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88449/testReport)** for PR 20870 at commit [`df45286`](https://github.com/apache/spark/commit/df452861d16eb36c9982f6c438ea1dc2f8d9d1fc).
     * This patch **fails due to an unknown error code, -9**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

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


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

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


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

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


---

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


[GitHub] spark pull request #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElim...

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

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


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

    https://github.com/apache/spark/pull/20870
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/1664/
    Test PASSed.


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

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


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

    https://github.com/apache/spark/pull/20870
  
    jenkins retest this please


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL]: CodegenContext.withSubExprEliminatio...

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

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


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

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


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

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


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL] CodegenContext.withSubExprElimination...

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

    https://github.com/apache/spark/pull/20870
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/1671/
    Test PASSed.


---

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


[GitHub] spark issue #20870: [SPARK-23760][SQL]: CodegenContext.withSubExprEliminatio...

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

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


---

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