anoopj commented on code in PR #18740:
URL: https://github.com/apache/iceberg/pull/18740#discussion_r4444194345


##########
core/src/test/java/org/apache/iceberg/TestFilePlanner.java:
##########
@@ -273,6 +274,58 @@ void filterHonorsCaseSensitivity(FileFormat format) throws 
IOException {
         .hasMessageContaining("Cannot find field 'ID'");
   }
 
+  @ParameterizedTest
+  @FieldSource("MANIFEST_FORMATS")
+  void columnStatsOmittedByDefault(FileFormat format) throws IOException {
+    ManifestFile root =
+        writeManifest(
+            format, EMPTY_PARTITION, 
ImmutableList.of(dataFileWithStats(FILE_A, idStats(0, 99))));
+
+    DataFile file = Iterables.getOnlyElement(plan(root, 
UNPARTITIONED_SPECS)).file();
+
+    assertThat(file.lowerBounds())
+        .as("no column stats are returned unless projectStats requests them")
+        .isNull();
+    assertThat(file.valueCounts()).as("value counts are also omitted by 
default").isNull();
+  }
+
+  @ParameterizedTest
+  @FieldSource("MANIFEST_FORMATS")
+  void projectStatsForwardedToRootAndLeafReaders(FileFormat format) throws 
IOException {

Review Comment:
    renamed to `taskOmitsStatsUnlessProjected`. I went with "projected" to 
match the `projectStats(...)` API verb.



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

Reply via email to