pvary commented on code in PR #15700:
URL: https://github.com/apache/iceberg/pull/15700#discussion_r3099141148
##########
parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java:
##########
@@ -266,7 +266,12 @@ public WriteBuilder overwrite(boolean enabled) {
}
public WriteBuilder writerVersion(WriterVersion version) {
- this.writerVersion = version;
+ Preconditions.checkNotNull(version, "Writer version cannot be null");
+ Preconditions.checkArgument(
+ version == WriterVersion.PARQUET_1_0 || version ==
WriterVersion.PARQUET_2_0,
+ "Unsupported writer version: %s",
+ version);
+ this.config.put(PARQUET_PAGE_VERSION, version ==
WriterVersion.PARQUET_2_0 ? "v2" : "v1");
Review Comment:
nit: You don't need `this` here
```suggestion
config.put(PARQUET_PAGE_VERSION, version == WriterVersion.PARQUET_2_0
? "v2" : "v1");
```
--
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]