CodingCat commented on a change in pull request #30972:
URL: https://github.com/apache/spark/pull/30972#discussion_r550011892
##########
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 {
Review comment:
intentionally to be synchronized as StringCache is singleton....
----------------------------------------------------------------
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]