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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to