uros-b commented on code in PR #57658:
URL: https://github.com/apache/spark/pull/57658#discussion_r3692729851


##########
docs/sql-data-sources-csv.md:
##########
@@ -209,7 +209,7 @@ Data source options of CSV can be set via:
     <td>PERMISSIVE</td>
     <td>Allows a mode for dealing with corrupt records during parsing. It 
supports the following case-insensitive modes. Note that Spark tries to parse 
only required columns in CSV under column pruning. Therefore, corrupt records 
can be different based on required set of fields. This behavior can be 
controlled by <code>spark.sql.csv.parser.columnPruning.enabled</code> (enabled 
by default).<br>
     <ul>
-      <li><code>PERMISSIVE</code>: when it meets a corrupted record, puts the 
malformed string into a field configured by 
<code>columnNameOfCorruptRecord</code>, and sets malformed fields to 
<code>null</code>. To keep corrupt records, an user can set a string type field 
named <code>columnNameOfCorruptRecord</code> in an user-defined schema. If a 
schema does not have the field, it drops corrupt records during parsing. A 
record with less/more tokens than schema is not a corrupted record to CSV. When 
it meets a record having fewer tokens than the length of the schema, sets 
<code>null</code> to extra fields. When the record has more tokens than the 
length of the schema, it drops extra tokens.</li>
+      <li><code>PERMISSIVE</code>: when it meets a corrupted record, puts the 
malformed string into a field configured by 
<code>columnNameOfCorruptRecord</code>, and sets malformed fields to 
<code>null</code>. To capture the malformed string, an user can set a string 
type field named <code>columnNameOfCorruptRecord</code> in an user-defined 
schema. If a schema does not have the field, the corrupt record is still 
retained with its malformed fields set to <code>null</code>, but the malformed 
string is not available. A record with less/more tokens than schema is not a 
corrupted record to CSV. When it meets a record having fewer tokens than the 
length of the schema, sets <code>null</code> to extra fields. When the record 
has more tokens than the length of the schema, it drops extra tokens.</li>

Review Comment:
   ```suggestion
         <li><code>PERMISSIVE</code>: when it meets a corrupted record, puts 
the malformed string into a field configured by 
<code>columnNameOfCorruptRecord</code>, and sets malformed fields to 
<code>null</code>. To capture the malformed string, a user can set a string 
type field named <code>columnNameOfCorruptRecord</code> in a user-defined 
schema. If a schema does not have the field, the corrupt record is still 
retained with its malformed fields set to <code>null</code>, but the malformed 
string is not available. A record with less/more tokens than schema is not a 
corrupted record to CSV. When it meets a record having fewer tokens than the 
length of the schema, sets <code>null</code> to extra fields. When the record 
has more tokens than the length of the schema, it drops extra tokens.</li>
   ```



-- 
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