nastra commented on code in PR #11502:
URL: https://github.com/apache/iceberg/pull/11502#discussion_r1848241182


##########
flink/v1.18/flink/src/test/java/org/apache/iceberg/flink/source/TestMetadataTableReadableMetrics.java:
##########
@@ -212,32 +215,88 @@ protected Object[] row(Object... values) {
 
   @TestTemplate
   public void testPrimitiveColumns() throws Exception {
-    createPrimitiveTable();
+    Table table = createPrimitiveTable();
     List<Row> result = sql("SELECT readable_metrics FROM %s$files", 
TABLE_NAME);
 
+    // With new releases of Parquet, new features might be added which cause 
the
+    // size of the column to increase. For example, with Parquet 1.14.x the
+    // uncompressed size has been added to allow for better allocation of 
memory upfront.
+    // Therefore, we look the sizes up, rather than hardcoding them
+    DataFile dataFile = 
table.currentSnapshot().addedDataFiles(table.io()).iterator().next();

Review Comment:
   it seems that we're assuming only a single file, so we might as well use 
`Iterables.getOnlyElement(table.currentSnapshot().addedDataFiles(table.io()))`



-- 
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