Skip to content

Commit

Permalink
[SPARK-32560][SQL] Improve exception message at InsertIntoHiveTable.p…
Browse files Browse the repository at this point in the history
…rocessInsert

### 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 <46367746+GuoPhilipse@users.noreply.github.com>
Co-authored-by: GuoPhilipse <guofei_ok@126.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
(cherry picked from commit aa4d3c1)
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
  • Loading branch information
2 people authored and HyukjinKwon committed Aug 7, 2020
1 parent 7dc17cd commit 701c44d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,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'")
}
}
}
Expand Down Expand Up @@ -284,7 +284,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
Expand Down

0 comments on commit 701c44d

Please sign in to comment.