[SPARK-21640] Add errorifexists as a valid string for ErrorIfExists save mode
## What changes were proposed in this pull request? This PR includes the changes to make the string "errorifexists" also valid for ErrorIfExists save mode. ## How was this patch tested? Unit tests and manual tests Author: arodriguez <arodriguez@arodriguez.stratio> Closes #18844 from ardlema/SPARK-21640.
This commit is contained in:
parent
ba327ee54c
commit
dcac1d57f0
|
@ -71,7 +71,7 @@ final class DataFrameWriter[T] private[sql](ds: Dataset[T]) {
|
|||
case "overwrite" => SaveMode.Overwrite
|
||||
case "append" => SaveMode.Append
|
||||
case "ignore" => SaveMode.Ignore
|
||||
case "error" | "default" => SaveMode.ErrorIfExists
|
||||
case "error" | "errorifexists" | "default" => SaveMode.ErrorIfExists
|
||||
case _ => throw new IllegalArgumentException(s"Unknown save mode: $saveMode. " +
|
||||
"Accepted save modes are 'overwrite', 'append', 'ignore', 'error'.")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue