HyukjinKwon opened a new pull request #32145:
URL: https://github.com/apache/spark/pull/32145


   ### What changes were proposed in this pull request?
   
   This PR makes the input buffer configurable (as an internal option). This is 
mainly to work around uniVocity/univocity-parsers#449.
   
   ### Why are the changes needed?
   
   To work around uniVocity/univocity-parsers#449.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No, it's only internal option.
   
   ### How was this patch tested?
   
   Manually tested by modifying the unittest added in 
https://github.com/apache/spark/pull/31858 as below:
   
   ```diff
   diff --git 
a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
 
b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
   index fd25a79619d..b58f0bd3661 100644
   --- 
a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
   +++ 
b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
   @@ -2460,6 +2460,7 @@ abstract class CSVSuite
          Seq(line).toDF.write.text(path.getAbsolutePath)
          assert(spark.read.format("csv")
            .option("delimiter", "|")
   +        .option("inputBuffer", "128")
            .option("ignoreTrailingWhiteSpace", 
"true").load(path.getAbsolutePath).count() == 1)
        }
      }
   ```


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

Reply via email to