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 <[email protected]>
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 
<[email protected]>
    Co-authored-by: GuoPhilipse <[email protected]>
    Signed-off-by: HyukjinKwon <[email protected]>
    (cherry picked from commit aa4d3c19fead4ec2f89b4957b4ccc7482e121e4d)
    Signed-off-by: HyukjinKwon <[email protected]>
---
 .../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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to