public void addFile(MixedFileScanTask task) {

    DataFileType fileType = task.fileType();
    if (fileType == null) {
      LOG.warn("file type is null");
      return;
    }
    if (fileType == DataFileType.BASE_FILE || fileType == DataFileType.INSERT_FILE) {
      cost = cost + Math.max(task.file().fileSizeInBytes(), openFileCost);
      rowNums = rowNums + task.file().recordCount();
    }
    switch (fileType) {
      case BASE_FILE:
        baseTasks.add(task);
        break;
      case INSERT_FILE:
        insertTasks.add(task);
        break;
      case EQ_DELETE_FILE:
        deleteFiles.add(task);
        break;
      default:
        LOG.warn("file type is {}, not add in node", fileType);
        // ignore the object
    }
  }
Implementation of {@link KeyedTableScanTask} with files in one single {@link DataTreeNode}
amoro-format-iceberg/src/main/java/org/apache/amoro/scan/NodeFileScanTask.java