You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by wangyang1992 <gi...@git.apache.org> on 2016/05/18 20:06:24 UTC

[GitHub] spark pull request: [SPARK-15388][SQL] Fix spark sql CREATE FUNCTI...

GitHub user wangyang1992 opened a pull request:

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

    [SPARK-15388][SQL] Fix spark sql CREATE FUNCTION using hive 1.2.1

    ## What changes were proposed in this pull request?
    
    spark.sql("CREATE FUNCTION myfunc AS 'com.haizhi.bdp.udf.UDFGetGeoCode'") throws "org.apache.hadoop.hive.ql.metadata.HiveException:MetaException(message:NoSuchObjectException(message:Function default.myfunc does not exist))" using hive 1.2.1.
    
    I think it is introduced by pr #12853. Fixing it by catching Exception (not NoSuchObjectException) and string matching.
    
    ## How was this patch tested?
    
    added a unit test and also tested it manually
    
    


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

    $ git pull https://github.com/wangyang1992/spark fixCreateFunc2

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

    https://github.com/apache/spark/pull/13177.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 #13177
    
----
commit 08435b91b07a9f9aebde493aeec5725e28756ea7
Author: wangyang <wa...@haizhi.com>
Date:   2016-05-18T19:56:19Z

    fix create table with hive 1.2.1

----


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-221180144
  
    **[Test build #59186 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59186/consoleFull)** for PR 13177 at commit [`156fea0`](https://github.com/apache/spark/commit/156fea0db2856c4eda3ff7496218e1c7d2082c4a).


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-221190245
  
    **[Test build #59186 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59186/consoleFull)** for PR 13177 at commit [`156fea0`](https://github.com/apache/spark/commit/156fea0db2856c4eda3ff7496218e1c7d2082c4a).
     * 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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-221147177
  
    Hi @andrewor14, I have checked out the CausedBy source code, I think it will return the root cause of the Exception being thrown not the first Exception. 
    I copied the CausedBy source code and created a notebook. (https://databricks-prod-cloudfront.cloud.databricks.com/public/4027ec902e239c93eaaa8714f173bcfc/7973071962862063/390461470296902/58107563000366/latest.html)
    Would you please go over it sometime? If it is the situation you are worried about, I think we can catch it.


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-221354877
  
    @wangyang1992 you should add the email address you used in your commit to your github profile, so the commit is associated with your account. Thanks.



---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#discussion_r63809772
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ---
    @@ -480,7 +480,7 @@ private[client] class Shim_v0_13 extends Shim_v0_12 {
         try {
           Option(hive.getFunction(db, name)).map(fromHiveFunction)
         } catch {
    -      case CausedBy(ex: NoSuchObjectException) if ex.getMessage.contains(name) =>
    +      case CausedBy(ex: Exception) if ex.getMessage.contains(s"$name does not exist") =>
    --- End diff --
    
    Hm.. I am not familiar with this part though.. Would this be safe to catch all the exceptions?


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-221189289
  
    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: [SPARK-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-221189291
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/59185/
    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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-221189106
  
    **[Test build #59185 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59185/consoleFull)** for PR 13177 at commit [`9f3b7db`](https://github.com/apache/spark/commit/9f3b7db2265ff2c89dc70feda8cd3e11f94f738e).
     * 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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#discussion_r63773414
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ---
    @@ -480,7 +480,7 @@ private[client] class Shim_v0_13 extends Shim_v0_12 {
         try {
           Option(hive.getFunction(db, name)).map(fromHiveFunction)
         } catch {
    -      case CausedBy(ex: NoSuchObjectException) if ex.getMessage.contains(name) =>
    +      case CausedBy(ex: Exception) if ex.getMessage.contains(s"$name does not exist") =>
    --- End diff --
    
    @andrewor14 Maybe it is safer this way. What do you 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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#discussion_r63928923
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ---
    @@ -480,7 +480,7 @@ private[client] class Shim_v0_13 extends Shim_v0_12 {
         try {
           Option(hive.getFunction(db, name)).map(fromHiveFunction)
         } catch {
    -      case CausedBy(ex: NoSuchObjectException) if ex.getMessage.contains(name) =>
    +      case CausedBy(ex: Exception) if ex.getMessage.contains(s"$name does not exist") =>
    --- End diff --
    
    this won't actually work because it'll find the first exception it sees and tries to match the message. You'll need to do this recursively and match all the messages in the exception stack


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-220437364
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/58886/
    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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-220437363
  
    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: [SPARK-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-221178563
  
    @wangyang1992 thanks for the notebook. I am surprised it works actually! That said I do prefer your latest solution, which is more explicit and easier to understand. Once you address the last comment I'll go ahead and merge 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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#discussion_r64335588
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ---
    @@ -480,11 +480,21 @@ private[client] class Shim_v0_13 extends Shim_v0_12 {
         try {
           Option(hive.getFunction(db, name)).map(fromHiveFunction)
         } catch {
    -      case CausedBy(ex: NoSuchObjectException) if ex.getMessage.contains(name) =>
    +      case e: Throwable if isCausedBy(e, s"$name does not exist") =>
    --- End diff --
    
    @andrewor14 thanks. Changed to NonFatal.


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-220142453
  
    Can one of the admins verify this patch?


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#discussion_r63815687
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ---
    @@ -480,7 +480,7 @@ private[client] class Shim_v0_13 extends Shim_v0_12 {
         try {
           Option(hive.getFunction(db, name)).map(fromHiveFunction)
         } catch {
    -      case CausedBy(ex: NoSuchObjectException) if ex.getMessage.contains(name) =>
    +      case CausedBy(ex: Exception) if ex.getMessage.contains(s"$name does not exist") =>
    --- End diff --
    
    The objective here is not to catch all the exceptions but the ones caused by the function not existing. In my case, this exception is "org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:NoSuchObjectException(message:Function default.func does not exist))" whose root cause is MetaException, but it may vary in different situations (not really sure it varies, just conjecture based on previous code. See pr #12198 and #12853).


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-221190462
  
    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: [SPARK-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#discussion_r64334408
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ---
    @@ -480,11 +480,21 @@ private[client] class Shim_v0_13 extends Shim_v0_12 {
         try {
           Option(hive.getFunction(db, name)).map(fromHiveFunction)
         } catch {
    -      case CausedBy(ex: NoSuchObjectException) if ex.getMessage.contains(name) =>
    +      case e: Throwable if isCausedBy(e, s"$name does not exist") =>
    --- End diff --
    
    @andrewor14 will this work?


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-220424714
  
    By the way, great catch @wangyang1992!


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-220880826
  
    Hi @andrewor14,  sorry to bother you, but does this pr need to be further refined, or it is ready to merge? Could you please give me some instructions? Thanks.


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-221457800
  
    Thanks @rxin . Added it.


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-221178646
  
    **[Test build #59185 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59185/consoleFull)** for PR 13177 at commit [`9f3b7db`](https://github.com/apache/spark/commit/9f3b7db2265ff2c89dc70feda8cd3e11f94f738e).


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-221183935
  
    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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

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


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#discussion_r64334580
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ---
    @@ -480,11 +480,21 @@ private[client] class Shim_v0_13 extends Shim_v0_12 {
         try {
           Option(hive.getFunction(db, name)).map(fromHiveFunction)
         } catch {
    -      case CausedBy(ex: NoSuchObjectException) if ex.getMessage.contains(name) =>
    +      case e: Throwable if isCausedBy(e, s"$name does not exist") =>
    --- End diff --
    
    yes, but would you mind doing `case NonFatal(e) =>` here? It's generally a bad practice to catch throwables


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-221059308
  
    I don't think this patch works right now if the `does not exist` message is nested several layers deep. `CausedBy` just returns the first `Exception` it finds, and if that exception doesn't contain the message then we won't catch it. Does that make sense?


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-220421059
  
    ok to 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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-220501798
  
    @andrewor14 Thanks :-).  Do I still need to modify the code? Frankly, I don't really understand your comment above.  ("this won't actually work because it'll find the first exception it sees and tries to match the message. You'll need to do this recursively and match all the messages in the exception stack")


---
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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-220437120
  
    **[Test build #58886 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/58886/consoleFull)** for PR 13177 at commit [`08435b9`](https://github.com/apache/spark/commit/08435b91b07a9f9aebde493aeec5725e28756ea7).
     * 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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-221190463
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/59186/
    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-15388][SQL] Fix spark sql CREATE FUNCTI...

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

    https://github.com/apache/spark/pull/13177#issuecomment-220421350
  
    **[Test build #58886 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/58886/consoleFull)** for PR 13177 at commit [`08435b9`](https://github.com/apache/spark/commit/08435b91b07a9f9aebde493aeec5725e28756ea7).


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