CodingCat commented on a change in pull request #30972:
URL: https://github.com/apache/spark/pull/30972#discussion_r550267066
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CsvOutputWriter.scala
##########
@@ -47,3 +50,15 @@ class CsvOutputWriter(
override def close(): Unit = gen.close()
}
+
+object CsvOutputWriter {
+
+ def createUnivocityGenerator(
+ maxLength: Int,
+ writer: OutputStreamWriter,
+ dataSchema: StructType,
+ params: CSVOptions): UnivocityGenerator = this.synchronized {
+ NormalizedString.getCache.setMaxStringLength(maxLength)
+ new UnivocityGenerator(dataSchema, writer, params)
Review comment:
yeah, it's a good question and valid concern...it will
one possible way is to always take the biggest value passed by the user to
this config?
----------------------------------------------------------------
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]