Skip to content

Commit 0ce01d0

Browse files
committed
Restore mode partitionBy
1 parent e9d4605 commit 0ce01d0

File tree

2 files changed

+9
-19
lines changed

2 files changed

+9
-19
lines changed

docs/sql-data-sources-orc.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -187,25 +187,6 @@ Data source options of ORC can be set via:
187187
<td>sets whether we should merge schemas collected from all ORC part-files. This will override <code>spark.sql.orc.mergeSchema</code>. The default value is specified in <code>spark.sql.orc.mergeSchema</code>.</td>
188188
<td>read</td>
189189
</tr>
190-
<tr>
191-
<td><code>mode</code></td>
192-
<td>None</td>
193-
<td>specifies the behavior of the save operation when data already exists.<br>
194-
<ul>
195-
<li><code>append</code>: Append contents of this <a href="https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.sql.DataFrame.html#pyspark.sql.DataFrame"> DataFrame</a> to existing data.</li>
196-
<li><code>overwrite</code>: Overwrite existing data.</li>
197-
<li><code>ignore</code>: Silently ignore this operation if data already exists.</li>
198-
<li><code>error</code> or <code>errorifexists</code> (default case)</code>: Throw an exception if data already exists.</li>
199-
</ul>
200-
</td>
201-
<td>write</td>
202-
</tr>
203-
<tr>
204-
<td><code>partitionBy</code></td>
205-
<td>None</td>
206-
<td>names of partitioning columns</td>
207-
<td>write</td>
208-
</tr>
209190
<tr>
210191
<td><code>compression</code></td>
211192
<td>None</td>

python/pyspark/sql/readwriter.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,6 +1394,15 @@ def orc(self, path, mode=None, partitionBy=None, compression=None):
13941394
----------
13951395
path : str
13961396
the path in any Hadoop supported file system
1397+
mode : str, optional
1398+
specifies the behavior of the save operation when data already exists.
1399+
* ``append``: Append contents of this :class:`DataFrame` to existing data.
1400+
* ``overwrite``: Overwrite existing data.
1401+
* ``ignore``: Silently ignore this operation if data already exists.
1402+
* ``error`` or ``errorifexists`` (default case): Throw an exception if data already \
1403+
exists.
1404+
partitionBy : str or list, optional
1405+
names of partitioning columns
13971406
13981407
Other Parameters
13991408
----------------

0 commit comments

Comments
 (0)