You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2020/08/07 05:34:16 UTC

[spark] branch branch-3.0 updated: [SPARK-32560][SQL] Improve exception message at InsertIntoHiveTable.processInsert

This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 4d8642f  [SPARK-32560][SQL] Improve exception message at InsertIntoHiveTable.processInsert
4d8642f is described below

commit 4d8642f8d90870f15097eb8124af66d2b8f6f024
Author: GuoPhilipse <46...@users.noreply.github.com>
AuthorDate: Fri Aug 7 14:29:32 2020 +0900

    [SPARK-32560][SQL] Improve exception message at InsertIntoHiveTable.processInsert
    
    ### What changes were proposed in this pull request?
    improve exception message
    
    ### Why are the changes needed?
    the before message lack of single quotes, we may improve it to keep consisent.
    ![image](https://user-images.githubusercontent.com/46367746/89595808-15bbc300-d888-11ea-9914-b05ea7b66461.png)
    
    ### Does this PR introduce _any_ user-facing change?
    NO
    
    ### How was this patch tested?
    No ,it is only improving the message.
    
    Closes #29376 from GuoPhilipse/improve-exception-message.
    
    Lead-authored-by: GuoPhilipse <46...@users.noreply.github.com>
    Co-authored-by: GuoPhilipse <gu...@126.com>
    Signed-off-by: HyukjinKwon <gu...@apache.org>
    (cherry picked from commit aa4d3c19fead4ec2f89b4957b4ccc7482e121e4d)
    Signed-off-by: HyukjinKwon <gu...@apache.org>
---
 .../org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala
index a0bdbec..05acca4 100644
--- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala
+++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala
@@ -243,7 +243,7 @@ case class InsertIntoHiveTable(
             if (fs.exists(partitionPath)) {
               if (!fs.delete(partitionPath, true)) {
                 throw new RuntimeException(
-                  "Cannot remove partition directory '" + partitionPath.toString)
+                  s"Cannot remove partition directory '$partitionPath'")
               }
             }
           }
@@ -295,7 +295,7 @@ case class InsertIntoHiveTable(
               if (fs.exists(path)) {
                 if (!fs.delete(path, true)) {
                   throw new RuntimeException(
-                    "Cannot remove partition directory '" + path.toString)
+                    s"Cannot remove partition directory '$path'")
                 }
                 // Don't let Hive do overwrite operation since it is slower.
                 doHiveOverwrite = false


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