aokolnychyi commented on code in PR #8346:
URL: https://github.com/apache/iceberg/pull/8346#discussion_r1302533840
##########
core/src/main/java/org/apache/iceberg/BaseCombinedScanTask.java:
##########
@@ -41,7 +42,38 @@ public BaseCombinedScanTask(List<FileScanTask> tasks) {
@Override
public Collection<FileScanTask> files() {
- return ImmutableList.copyOf(tasks);
+ if (taskList == null) {
+ this.taskList = ImmutableList.copyOf(tasks);
+ }
+
+ return taskList;
+ }
+
+ @Override
+ public long sizeBytes() {
+ long sizeBytes = 0L;
+ for (FileScanTask task : tasks) {
+ sizeBytes += task.sizeBytes();
+ }
+ return sizeBytes;
+ }
+
+ @Override
+ public long estimatedRowsCount() {
+ long estimatedRowsCount = 0L;
+ for (FileScanTask task : tasks) {
+ estimatedRowsCount += task.estimatedRowsCount();
+ }
+ return estimatedRowsCount;
+ }
+
+ @Override
+ public int filesCount() {
+ int filesCount = 0;
+ for (FileScanTask task : tasks) {
+ filesCount += task.filesCount();
Review Comment:
Yeah, that's the same behavior like we have today. I agree it is
questionable but it is also useful to estimate the actual bytes read for delete
files and how things overlap.
--
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]