HyukjinKwon commented on a change in pull request #32658:
URL: https://github.com/apache/spark/pull/32658#discussion_r638678476
##########
File path: docs/sql-data-sources-csv.md
##########
@@ -38,3 +38,217 @@ Spark SQL provides `spark.read().csv("file_name")` to read
a file or directory o
</div>
</div>
+
+## Data Source Option
+
+Data source options of CSV can be set via:
+* the `.option`/`.options` methods of
+ * `DataFrameReader`
+ * `DataFrameWriter`
+ * `DataStreamReader`
+ * `DataStreamWriter`
+
+<table class="table">
+ <tr><th><b>Property
Name</b></th><th><b>Default</b></th><th><b>Meaning</b></th><th><b>Scope</b></th></tr>
+ <tr>
+ <td><code>sep</code></td>
+ <td>None</td>
+ <td>Sets a separator (one or more characters) for each field and value. If
None is set, it uses the default value, <code>,</code>.</td>
+ <td>read/write</td>
+ </tr>
+ <tr>
+ <td><code>encoding</code></td>
+ <td>None</td>
+ <td>For reading, decodes the CSV files by the given encoding type. If None
is set, it uses the default value, <code>UTF-8</code>. For writing, sets the
encoding (charset) of saved csv files. If None is set, the default UTF-8
charset will be used.</td>
+ <td>read/write</td>
+ </tr>
+ <tr>
+ <td><code>quote</code></td>
+ <td>None</td>
+ <td>Sets a single character used for escaping quoted values where the
separator can be part of the value. If None is set, it uses the default value,
<code>"</code>. If you would like to turn off quotations, you need to set an
empty string. If an empty string is set, it uses <code>u0000</code> (null
character).</td>
Review comment:
You should better follow Scaladoc. `None` is only for Python
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]