hcrosse commented on code in PR #15700:
URL: https://github.com/apache/iceberg/pull/15700#discussion_r3082556906
##########
parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java:
##########
@@ -168,7 +170,7 @@ public static class WriteBuilder implements
InternalData.WriteBuilder {
private BiFunction<Schema, MessageType, ParquetValueWriter<?>>
createWriterFunc = null;
private MetricsConfig metricsConfig = MetricsConfig.getDefault();
private ParquetFileWriter.Mode writeMode = ParquetFileWriter.Mode.CREATE;
- private WriterVersion writerVersion = WriterVersion.PARQUET_1_0;
+ private WriterVersion writerVersion = null;
Review Comment:
Addressed by removing the field entirely per the config-map suggestion.
##########
parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java:
##########
@@ -297,6 +300,7 @@ private <T> WriteSupport<T> getWriteSupport(MessageType
type) {
*/
@VisibleForTesting
WriteBuilder withWriterVersion(WriterVersion version) {
+ Preconditions.checkNotNull(version, "Writer version cannot be null");
this.writerVersion = version;
return this;
}
Review Comment:
Removed. Updated `TestDictionaryRowGroupFilter` to use the public
`writerVersion()` method instead.
##########
parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java:
##########
@@ -364,6 +368,8 @@ public <D> FileAppender<D> build() throws IOException {
// Map Iceberg properties to pass down to the Parquet writer
Context context = createContextFunc.apply(config);
+ WriterVersion parquetWriterVersion =
+ writerVersion != null ? writerVersion : context.writerVersion();
Review Comment:
Addressed by removing the ternary. `build()` now reads directly from
`context.writerVersion()`.
--
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]