szehon-ho commented on code in PR #10759:
URL: https://github.com/apache/iceberg/pull/10759#discussion_r1690227872


##########
core/src/test/java/org/apache/iceberg/TestMetadataTableScans.java:
##########
@@ -1753,4 +1753,36 @@ public void testPositionDeletesManyColumns() {
     
assertThat(scanTasks.get(0).file().path().toString()).isEqualTo("/path/to/delete1.parquet");
     
assertThat(scanTasks.get(1).file().path().toString()).isEqualTo("/path/to/delete2.parquet");
   }
+
+  @TestTemplate
+  public void testFilesTableEstimateSize() throws Exception {
+    preparePartitionedTable(true);
+
+    assertEstimatedSize(new DataFilesTable(table));
+    assertEstimatedSize(new AllDataFilesTable(table));
+    assertEstimatedSize(new AllFilesTable(table));
+
+    if (formatVersion == 2) {
+      assertEstimatedSize(new DeleteFilesTable(table));
+      assertEstimatedSize(new AllDeleteFilesTable(table));
+    }
+  }
+
+  @TestTemplate
+  public void testEntriesTableEstimateSize() throws Exception {
+    preparePartitionedTable(true);
+
+    assertEstimatedSize(new ManifestEntriesTable(table));
+    assertEstimatedSize(new AllEntriesTable(table));
+  }
+
+  private void assertEstimatedSize(Table metadataTable) throws Exception {
+    TableScan scan = metadataTable.newScan();
+
+    try (CloseableIterable<FileScanTask> tasks = scan.planFiles()) {
+      List<FileScanTask> taskList = Lists.newArrayList(tasks);
+      assertThat(taskList.size()).isGreaterThan(0);
+      taskList.forEach(task -> 
assertThat(task.estimatedRowsCount()).isEqualTo(4));

Review Comment:
   Makes sense, ill make the change



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