You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by chenghao-intel <gi...@git.apache.org> on 2014/11/06 15:34:07 UTC

[GitHub] spark pull request: [SPARK-4274] [SQL] Print informative message w...

GitHub user chenghao-intel opened a pull request:

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

    [SPARK-4274] [SQL] Print informative message while logical plan analyzing failed in test

    

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

    $ git pull https://github.com/chenghao-intel/spark comparison_test

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

    https://github.com/apache/spark/pull/3139.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 #3139
    
----
commit d1bcee1c958f4d7d05d63bccbd400e4843544d14
Author: Cheng Hao <ha...@intel.com>
Date:   2014-11-06T14:32:34Z

    print informative message while logical plan analyzing failed in test

----


---
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-4274] [SQL] Print informative message w...

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

    https://github.com/apache/spark/pull/3139#issuecomment-62076727
  
    @marmbrus @rxin @liancheng Any comments about this?


---
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-4274] [SQL] Print informative message w...

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

    https://github.com/apache/spark/pull/3139#issuecomment-61999084
  
      [Test build #23006 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/23006/consoleFull) for   PR 3139 at commit [`d1bcee1`](https://github.com/apache/spark/commit/d1bcee1c958f4d7d05d63bccbd400e4843544d14).
     * 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-4274] [SQL] Print informative message w...

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

    https://github.com/apache/spark/pull/3139#discussion_r20034795
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala ---
    @@ -341,12 +341,21 @@ abstract class HiveComparisonTest
               val query = new TestHive.HiveQLQueryExecution(queryString)
               try { (query, prepareAnswer(query, query.stringResult())) } catch {
                 case e: Throwable =>
    +              val logicalQueryInString = try {
    +                query.toString
    --- End diff --
    
    In what case does the `toString` throw an exception?  I think thats the real bug.  Is it because `Code Generation: ${executedPlan.codegenEnabled}` is not wrapped in `stringOrError`?


---
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-4274] [SQL] Print informative message w...

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

    https://github.com/apache/spark/pull/3139#issuecomment-62306341
  
      [Test build #23118 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/23118/consoleFull) for   PR 3139 at commit [`f5d7146`](https://github.com/apache/spark/commit/f5d714662d4a2e487d42531c4df6dfcf0c49b296).
     * This patch merges cleanly.


---
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-4274] [SQL] Print informative message w...

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

    https://github.com/apache/spark/pull/3139#issuecomment-62308752
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/23118/
    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-4274] [SQL] Fix NPE in printing the det...

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

    https://github.com/apache/spark/pull/3139#issuecomment-62489785
  
    Thanks, merged to master and 1.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: [SPARK-4274] [SQL] Print informative message w...

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

    https://github.com/apache/spark/pull/3139#issuecomment-61987744
  
      [Test build #23006 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/23006/consoleFull) for   PR 3139 at commit [`d1bcee1`](https://github.com/apache/spark/commit/d1bcee1c958f4d7d05d63bccbd400e4843544d14).
     * This patch merges cleanly.


---
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-4274] [SQL] Print informative message w...

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

    https://github.com/apache/spark/pull/3139#discussion_r20053092
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala ---
    @@ -341,12 +341,21 @@ abstract class HiveComparisonTest
               val query = new TestHive.HiveQLQueryExecution(queryString)
               try { (query, prepareAnswer(query, query.stringResult())) } catch {
                 case e: Throwable =>
    +              val logicalQueryInString = try {
    +                query.toString
    --- End diff --
    
    I don't think thats correct, stringOrError takes a closure so the actual calculation is done inside of the function and should be correctly caught:
    
    ```scala
    scala> def stringOrError[A](f: => A): String =
         |       try f.toString catch { case e: Throwable => e.toString }
    stringOrError: [A](f: => A)String
    
    scala> stringOrError(sys.error("test"))
    res0: String = java.lang.RuntimeException: test
    
    scala> def error = sys.error("test")
    error: Nothing
    
    scala> stringOrError(error)
    res1: String = java.lang.RuntimeException: test
    ```


---
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-4274] [SQL] Print informative message w...

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

    https://github.com/apache/spark/pull/3139#discussion_r20051763
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala ---
    @@ -341,12 +341,21 @@ abstract class HiveComparisonTest
               val query = new TestHive.HiveQLQueryExecution(queryString)
               try { (query, prepareAnswer(query, query.stringResult())) } catch {
                 case e: Throwable =>
    +              val logicalQueryInString = try {
    +                query.toString
    --- End diff --
    
    See
    ```
    protected abstract class QueryExecution {
    ...
        override def toString: String =
          s"""== Parsed Logical Plan ==
             |${stringOrError(logical)}
             |== Analyzed Logical Plan ==
             |${stringOrError(analyzed)}
             |== Optimized Logical Plan ==
             |${stringOrError(optimizedPlan)}
             |== Physical Plan ==
             |${stringOrError(executedPlan)}
             |Code Generation: ${executedPlan.codegenEnabled}
             |== RDD ==
          """.stripMargin.trim
      }
    ```
    `logical`, `analyzed` etc. will be computed(which probably cause exception) before passing into `stringOrError`, not happen inside of `stringOrError`.
    
    Or you think we'd better to fix the `toString` 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 pull request: [SPARK-4274] [SQL] Fix NPE in printing the det...

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

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


---
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-4274] [SQL] Print informative message w...

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

    https://github.com/apache/spark/pull/3139#discussion_r20059176
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala ---
    @@ -341,12 +341,21 @@ abstract class HiveComparisonTest
               val query = new TestHive.HiveQLQueryExecution(queryString)
               try { (query, prepareAnswer(query, query.stringResult())) } catch {
                 case e: Throwable =>
    +              val logicalQueryInString = try {
    +                query.toString
    --- End diff --
    
    Oh, I didn't know this. Thank you @marmbrus very much for the code snippet.
    
    After debugging, I think you are right, the exception is thrown by `${executedPlan.codegenEnabled}`, the `executedPlan` is null if something wrong in parsing or analyzing etc. I've updated the code again.


---
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-4274] [SQL] Print informative message w...

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

    https://github.com/apache/spark/pull/3139#issuecomment-61999095
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/23006/
    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-4274] [SQL] Print informative message w...

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

    https://github.com/apache/spark/pull/3139#issuecomment-62308750
  
      [Test build #23118 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/23118/consoleFull) for   PR 3139 at commit [`f5d7146`](https://github.com/apache/spark/commit/f5d714662d4a2e487d42531c4df6dfcf0c49b296).
     * 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-4274] [SQL] Fix NPE in printing the det...

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

    https://github.com/apache/spark/pull/3139#issuecomment-62488949
  
    I've updated the title of this PR, this is quite simple and ready to be merged.


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