You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by li...@apache.org on 2017/08/08 05:42:01 UTC

spark git commit: [SPARK-21640][FOLLOW-UP][SQL] added errorifexists on IllegalArgumentException message

Repository: spark
Updated Branches:
  refs/heads/master f763d8464 -> 312bebfb6


[SPARK-21640][FOLLOW-UP][SQL] added errorifexists on IllegalArgumentException message

## What changes were proposed in this pull request?

This commit adds a new argument for IllegalArgumentException message. This recent commit added the argument:

[https://github.com/apache/spark/commit/dcac1d57f0fd05605edf596c303546d83062a352](https://github.com/apache/spark/commit/dcac1d57f0fd05605edf596c303546d83062a352)

## How was this patch tested?

Unit test have been passed

Please review http://spark.apache.org/contributing.html before opening a pull request.

Author: Marcos P. Sanchez <mp...@stratio.com>

Closes #18862 from mpenate/feature/exception-errorifexists.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/312bebfb
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/312bebfb
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/312bebfb

Branch: refs/heads/master
Commit: 312bebfb6d9e3fc8d48d3c1f7509ba05059bd8b0
Parents: f763d84
Author: Marcos P. Sanchez <mp...@stratio.com>
Authored: Mon Aug 7 22:41:57 2017 -0700
Committer: gatorsmile <ga...@gmail.com>
Committed: Mon Aug 7 22:41:57 2017 -0700

----------------------------------------------------------------------
 docs/sql-programming-guide.md                                      | 2 +-
 sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/312bebfb/docs/sql-programming-guide.md
----------------------------------------------------------------------
diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md
index 7f7cf59..2ac2383 100644
--- a/docs/sql-programming-guide.md
+++ b/docs/sql-programming-guide.md
@@ -514,7 +514,7 @@ new data.
 <tr><th>Scala/Java</th><th>Any Language</th><th>Meaning</th></tr>
 <tr>
   <td><code>SaveMode.ErrorIfExists</code> (default)</td>
-  <td><code>"error"</code> (default)</td>
+  <td><code>"error" or "errorifexists"</code> (default)</td>
   <td>
     When saving a DataFrame to a data source, if data already exists,
     an exception is expected to be thrown.

http://git-wip-us.apache.org/repos/asf/spark/blob/312bebfb/sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
----------------------------------------------------------------------
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala b/sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
index 079f699..65c9ef4 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
@@ -73,7 +73,7 @@ final class DataFrameWriter[T] private[sql](ds: Dataset[T]) {
       case "ignore" => SaveMode.Ignore
       case "error" | "errorifexists" | "default" => SaveMode.ErrorIfExists
       case _ => throw new IllegalArgumentException(s"Unknown save mode: $saveMode. " +
-        "Accepted save modes are 'overwrite', 'append', 'ignore', 'error'.")
+        "Accepted save modes are 'overwrite', 'append', 'ignore', 'error', 'errorifexists'.")
     }
     this
   }


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