rdblue commented on code in PR #8552:
URL: https://github.com/apache/iceberg/pull/8552#discussion_r1343150026
##########
core/src/test/java/org/apache/iceberg/view/TestViewMetadataParser.java:
##########
@@ -308,4 +322,57 @@ public void
replaceViewMetadataWithMultipleSQLsForDialect() throws Exception {
assertThat(replaced.currentVersion()).isEqualTo(viewVersion);
}
+
+ @ParameterizedTest
+ @ValueSource(strings = {"none", "gzip"})
+ public void metadataCompression(String codecName) throws IOException {
+ Codec codec = Codec.fromName(codecName);
+ String location = Paths.get(tmp.toString(), "v1" +
getFileExtension(codec)).toString();
Review Comment:
I don't think that this should rely on `getFileExtension`. It's fine that it
is used by `BaseViewOperations` to name the file, but there's no need to do
that here. Instead, I think this should be parameterized by file name
(`v1.metadata.json` and `v1.gz.metadata.json`) so that it is obvious what
happens based on the file name in the test. Otherwise this is testing that the
extension produced by `getFileExtension` triggers some behavior in the parser,
rather than a specific extension triggers behavior in the parser.
--
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]