mxm commented on code in PR #15700:
URL: https://github.com/apache/iceberg/pull/15700#discussion_r3087461479
##########
core/src/main/java/org/apache/iceberg/TableProperties.java:
##########
@@ -135,6 +135,9 @@ private TableProperties() {}
"write.delete.parquet.page-size-bytes";
public static final int PARQUET_PAGE_SIZE_BYTES_DEFAULT = 1024 * 1024; // 1
MB
+ public static final String PARQUET_PAGE_VERSION =
"write.parquet.page-version";
+ public static final String PARQUET_PAGE_VERSION_DEFAULT = "1";
Review Comment:
That's a good point. I'm leaning more towards keeping this simple, but you
are right about consistency. Maybe let somebody else chime in here.
##########
parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java:
##########
@@ -706,6 +709,29 @@ private static CompressionCodecName toCodec(String
codecAsString) {
}
}
+ private static String fromWriterVersion(WriterVersion writerVersion) {
+ switch (writerVersion) {
+ case PARQUET_1_0:
+ return "1";
+ case PARQUET_2_0:
+ return "2";
+ default:
+ throw new IllegalArgumentException("Unsupported writer version: "
+ writerVersion);
+ }
+ }
Review Comment:
This isn't necessary. `WriterVersion#fromString` already handles this, e.g.
both `WriterVersion.fromString("PARQUET_2_0")` and
`WriterVersion.fromString("v2")` work.
I wonder, should we be consistent with Parquet and use `v1` and `v2`, like
Parquet (instead of "1" and "2")?
--
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]