dominikgehl commented on a change in pull request #33394:
URL: https://github.com/apache/spark/pull/33394#discussion_r672114383



##########
File path: python/pyspark/sql/readwriter.py
##########
@@ -742,10 +743,16 @@ def save(self, path=None, format=None, mode=None, 
partitionBy=None, **options):
     def insertInto(self, tableName, overwrite=None):
         """Inserts the content of the :class:`DataFrame` to the specified 
table.
 
+        Optionally overwriting any existing data.

Review comment:
       Done

##########
File path: python/pyspark/sql/readwriter.py
##########
@@ -766,6 +773,13 @@ def saveAsTable(self, name, format=None, mode=None, 
partitionBy=None, **options)
 
         .. versionadded:: 1.4.0
 
+        Notes
+        -----
+        When `mode` is `Append`, if there is an existing table, we will use 
the format and
+        options of the existing table. The column order in the schema of the 
`DataFrame` doesn't

Review comment:
       Done

##########
File path: python/pyspark/sql/readwriter.py
##########
@@ -742,10 +743,16 @@ def save(self, path=None, format=None, mode=None, 
partitionBy=None, **options):
     def insertInto(self, tableName, overwrite=None):
         """Inserts the content of the :class:`DataFrame` to the specified 
table.
 
+        Optionally overwriting any existing data.
+
         It requires that the schema of the :class:`DataFrame` is the same as 
the
         schema of the table.
 
-        Optionally overwriting any existing data.
+        Notes
+        -----
+        Unlike `saveAsTable`, `insertInto` ignores the column names and just 
uses

Review comment:
       Done

##########
File path: python/pyspark/sql/readwriter.py
##########
@@ -766,6 +773,13 @@ def saveAsTable(self, name, format=None, mode=None, 
partitionBy=None, **options)
 
         .. versionadded:: 1.4.0
 
+        Notes
+        -----
+        When `mode` is `Append`, if there is an existing table, we will use 
the format and
+        options of the existing table. The column order in the schema of the 
`DataFrame` doesn't
+        need to be same as that of the existing table. Unlike `insertInto`, 
`saveAsTable` will use

Review comment:
       Done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to