Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17310#discussion_r106357631
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVOptions.scala
 ---
    @@ -92,8 +92,13 @@ class CSVOptions(
     
       val headerFlag = getBool("header")
       val inferSchemaFlag = getBool("inferSchema")
    -  val ignoreLeadingWhiteSpaceFlag = getBool("ignoreLeadingWhiteSpace")
    -  val ignoreTrailingWhiteSpaceFlag = getBool("ignoreTrailingWhiteSpace")
    +  val ignoreLeadingWhiteSpaceInRead = getBool("ignoreLeadingWhiteSpace", 
default = false)
    +  val ignoreTrailingWhiteSpaceInRead = getBool("ignoreTrailingWhiteSpace", 
default = false)
    +
    +  // For write, both options were `true` by default. We leave it as `true` 
for
    +  // backwards compatibility.
    +  val ignoreLeadingWhiteSpaceFlagInWrite = 
getBool("ignoreLeadingWhiteSpace", default = true)
    +  val ignoreTrailingWhiteSpaceFlagInWrite = 
getBool("ignoreTrailingWhiteSpace", default = true)
    --- End diff --
    
    This case has been `true` by defaults before 
(https://github.com/uniVocity/univocity-parsers/blob/644e76005f52a3a2b9b29844c3ed9daa5ba128aa/src/main/java/com/univocity/parsers/common/CommonSettings.java#L182).
    
    So, I left them as `true` by default for now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to