gtrettenero commented on code in PR #17490:
URL: https://github.com/apache/iceberg/pull/17490#discussion_r3705957136


##########
core/src/main/java/org/apache/iceberg/SnapshotChanges.java:
##########
@@ -167,7 +174,7 @@ private CloseableIterable<Pair<ManifestEntry.Status, 
DataFile>> readDataManifest
         relevant,
         entry -> {
           if (entry.status() == ManifestEntry.Status.ADDED) {
-            return Pair.of(ManifestEntry.Status.ADDED, entry.file().copy());
+            return Pair.of(ManifestEntry.Status.ADDED, 
entry.file().copy(columnStats));

Review Comment:
   `ContentFile.copy(boolean)` is a default method: `withStats ? copy() : 
copyWithoutStats()`. So `copy(false) `is `copyWithoutStats()`.
   
   The idea for having it is that `manifestColumns()` delegates to 
BaseScan.scanColumns() and if a stats column were ever added there for 
scan-planning reasons, includeColumnStats(false) would silently start returning 
stats again. But as of today it I remove the boolean then nothing would change 
since the stats columns are never decoded in the first place when 
includeColumnStats(false) 



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