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

[GitHub] spark pull request #21297: [SPARK-24246][SQL]Improve AnalysisException by se...

GitHub user zsxwing opened a pull request:

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

    [SPARK-24246][SQL]Improve AnalysisException by setting the cause when it's available

    ## What changes were proposed in this pull request?
    
    If there is an exception, it's better to set it as the cause of AnalysisException since the exception may contain useful debug information.
    
    ## How was this patch tested?
    
    Jenkins

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

    $ git pull https://github.com/zsxwing/spark SPARK-24246

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

    https://github.com/apache/spark/pull/21297.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 #21297
    
----
commit cd0dbcf0add48a0426b08c6ba4fdd5e5489a367b
Author: Shixiong Zhu <zs...@...>
Date:   2018-05-10T21:15:11Z

    Improve AnalysisException by setting the cause when it's available

----


---

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


[GitHub] spark issue #21297: [SPARK-24246][SQL]Improve AnalysisException by setting t...

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

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


---

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


[GitHub] spark issue #21297: [SPARK-24246][SQL]Improve AnalysisException by setting t...

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

    https://github.com/apache/spark/pull/21297
  
    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/3114/
    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 #21297: [SPARK-24246][SQL]Improve AnalysisException by se...

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

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


---

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


[GitHub] spark issue #21297: [SPARK-24246][SQL]Improve AnalysisException by setting t...

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

    https://github.com/apache/spark/pull/21297
  
    Thanks! Merged to master/2.3


---

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


[GitHub] spark issue #21297: [SPARK-24246][SQL]Improve AnalysisException by setting t...

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

    https://github.com/apache/spark/pull/21297
  
    **[Test build #90479 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/90479/testReport)** for PR 21297 at commit [`cd0dbcf`](https://github.com/apache/spark/commit/cd0dbcf0add48a0426b08c6ba4fdd5e5489a367b).
     * 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 issue #21297: [SPARK-24246][SQL]Improve AnalysisException by setting t...

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

    https://github.com/apache/spark/pull/21297
  
    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 #21297: [SPARK-24246][SQL]Improve AnalysisException by setting t...

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

    https://github.com/apache/spark/pull/21297
  
    cc @gatorsmile 


---

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


[GitHub] spark issue #21297: [SPARK-24246][SQL]Improve AnalysisException by setting t...

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

    https://github.com/apache/spark/pull/21297
  
    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 pull request #21297: [SPARK-24246][SQL]Improve AnalysisException by se...

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

    https://github.com/apache/spark/pull/21297#discussion_r187463465
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/package.scala ---
    @@ -41,6 +41,11 @@ package object analysis {
         def failAnalysis(msg: String): Nothing = {
           throw new AnalysisException(msg, t.origin.line, t.origin.startPosition)
         }
    +
    +    /** Fails the analysis at the point where a specific tree node was parsed. */
    +    def failAnalysis(msg: String, cause: Throwable): Nothing = {
    --- End diff --
    
    BTW, I don't why the return type is `Nothing`. I just followed the above method.


---

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


[GitHub] spark issue #21297: [SPARK-24246][SQL]Improve AnalysisException by setting t...

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

    https://github.com/apache/spark/pull/21297
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/90479/
    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 #21297: [SPARK-24246][SQL]Improve AnalysisException by se...

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

    https://github.com/apache/spark/pull/21297#discussion_r187463328
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/package.scala ---
    @@ -41,6 +41,11 @@ package object analysis {
         def failAnalysis(msg: String): Nothing = {
           throw new AnalysisException(msg, t.origin.line, t.origin.startPosition)
         }
    +
    +    /** Fails the analysis at the point where a specific tree node was parsed. */
    +    def failAnalysis(msg: String, cause: Throwable): Nothing = {
    --- End diff --
    
    I added a new method rather than using default parameter to maintain binary compatibly.


---

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