rdblue commented on a change in pull request #4446:
URL: https://github.com/apache/iceberg/pull/4446#discussion_r839973586
##########
File path:
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/source/SparkScan.java
##########
@@ -148,7 +148,9 @@ protected Statistics estimateStatistics(Snapshot snapshot) {
for (CombinedScanTask task : tasks()) {
for (FileScanTask file : task.files()) {
- numRows += file.file().recordCount();
+ // TODO: if possible, take deletes also into consideration.
+ double fractionOfFileScanned = ((double) file.length() /
file.file().fileSizeInBytes());
Review comment:
I think the parens make more sense around `(double) file.length()`.
Otherwise it is still not clear whether integer division or the cast is
happening first.
--
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]