amogh-jahagirdar commented on code in PR #18740:
URL: https://github.com/apache/iceberg/pull/18740#discussion_r4437680714


##########
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:
   Similar to above, a comment on the test name: the behavior we're verifying 
is that tasks come back with stats when they're projected; 
forwardedToRootAndLeafReader is an implementation detail. Whether a file comes 
from the root or a leaf doesn't change that behavior, though I agree we should 
keep covering both. How about `tasksContainProjectedStats`?
   



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