Repository: spark
Updated Branches:
  refs/heads/branch-1.3 9d88f0cbd -> 3ea38bc3d


[SPARK-6366][SQL] In Python API, the default save mode for save and saveAsTable 
should be "error" instead of "append".

https://issues.apache.org/jira/browse/SPARK-6366

Author: Yin Huai <[email protected]>

Closes #5053 from yhuai/SPARK-6366 and squashes the following commits:

fc81897 [Yin Huai] Use error as the default save mode for save/saveAsTable.

(cherry picked from commit dc9c9196d63aa465e86ac52f0e86e10c12472100)
Signed-off-by: Cheng Lian <[email protected]>


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

Branch: refs/heads/branch-1.3
Commit: 3ea38bc3d8c6b6a5f75ee23a4a8799a1d137c6dd
Parents: 9d88f0c
Author: Yin Huai <[email protected]>
Authored: Wed Mar 18 09:41:06 2015 +0800
Committer: Cheng Lian <[email protected]>
Committed: Wed Mar 18 09:41:29 2015 +0800

----------------------------------------------------------------------
 python/pyspark/sql/dataframe.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/3ea38bc3/python/pyspark/sql/dataframe.py
----------------------------------------------------------------------
diff --git a/python/pyspark/sql/dataframe.py b/python/pyspark/sql/dataframe.py
index 94001ae..5cb89da 100644
--- a/python/pyspark/sql/dataframe.py
+++ b/python/pyspark/sql/dataframe.py
@@ -162,7 +162,7 @@ class DataFrame(object):
                 "Only 'append', 'overwrite', 'ignore', and 'error' are 
acceptable save mode.")
         return jmode
 
-    def saveAsTable(self, tableName, source=None, mode="append", **options):
+    def saveAsTable(self, tableName, source=None, mode="error", **options):
         """Saves the contents of the :class:`DataFrame` to a data source as a 
table.
 
         The data source is specified by the `source` and a set of `options`.
@@ -188,7 +188,7 @@ class DataFrame(object):
                                           
self.sql_ctx._sc._gateway._gateway_client)
         self._jdf.saveAsTable(tableName, source, jmode, joptions)
 
-    def save(self, path=None, source=None, mode="append", **options):
+    def save(self, path=None, source=None, mode="error", **options):
         """Saves the contents of the :class:`DataFrame` to a data source.
 
         The data source is specified by the `source` and a set of `options`.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to