wgtmac commented on code in PR #3396:
URL: https://github.com/apache/parquet-java/pull/3396#discussion_r3151692511
##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetWriter.java:
##########
@@ -395,7 +395,6 @@ public ParquetWriter(Path file, Configuration conf,
WriteSupport<T> writeSupport
fileWriter.start();
this.codecFactory = codecFactory;
- CompressionCodecFactory.BytesInputCompressor compressor =
codecFactory.getCompressor(compressionCodecName);
Review Comment:
`compressionCodecName` is unused now. Let's remove it?
##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetRecordWriter.java:
##########
@@ -200,16 +203,42 @@ public ParquetRecordWriter(
ParquetProperties props,
MemoryManager memoryManager,
Configuration conf) {
- this.codecFactory = new CodecFactory(conf, props.getPageSizeThreshold());
- internalWriter = new InternalParquetRecordWriter<T>(
+ this(
w,
writeSupport,
schema,
extraMetaData,
blockSize,
- codecFactory.getCompressor(codec),
validating,
- props);
+ ParquetProperties.copy(props).withCompressionCodec(codec).build(),
Review Comment:
The copy constructor of ParquetProperties does not preserve several
non-default fields. As a result, old callers can unintentionally reset settings
like `pageValueCountThreshold`, `columnIndexTruncateLength`,
`statisticsTruncateLength`, and `rowGroupRowCountLimit` when they hit this
overload.
--
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]