juja0 opened a new issue, #3224:
URL: https://github.com/apache/parquet-java/issues/3224

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   ParquetProperties.valuesWriterFactory defaults to a singleton instance of 
DefaultValuesWriterFactory.
   
   ParquetOutputFormat.getRecordWriter provides no way of setting/overriding 
"valuesWriterFactory" in ParquetProperties.Builder so the same singleton 
instance of DefaultValuesWriterFactory is used every time.
   
   DefaultValuesWriterFactory.initialize dynamically sets the instance field 
"delegateFactory" to either a v1 or v2 factory.
   
   When writing to multiple parquet files concurrently, with some threads using 
v1 and others using v2, the actual writer used becomes unpredictable and files 
get written with an incorrect format.
   
   Potential fix: ParquetProperties.Builder.valuesWriterFactory should not be 
instantiated to a singleton instance of DefaultValuesWriterFactory. Instead, it 
should be instantiated to a new instance of DefaultValuesWriterFactory in the 
constructor of ParquetProperties.Builder
   
   
   
   
   
   ### Component(s)
   
   _No response_


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