wypoon commented on code in PR #5755:
URL: https://github.com/apache/iceberg/pull/5755#discussion_r970199822


##########
api/src/main/java/org/apache/iceberg/ContentScanTask.java:
##########
@@ -66,7 +66,8 @@
 
   @Override
   default long estimatedRowsCount() {
-    double scannedFileFraction = ((double) length()) / 
file().fileSizeInBytes();
+    long splitOffset = (file().splitOffsets() != null) ? 
file().splitOffsets().get(0) : 0L;

Review Comment:
   That is a good question, and I believe the answer is no. The javadoc for 
`ContentFile#splitOffsets()` says
   "Returns list of recommended split locations, if applicable, null 
otherwise." Thus if there are no split offsets, null rather than an empty list 
should be returned. The javadoc also says "The returned list must be sorted in 
ascending order."



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