private CloseableIterable<T> newIterable(
      FileScanTask task, Schema schema, Map<Integer, ?> idToConstant) {
    CloseableIterable<T> iter;
    if (task.isDataTask()) {
      throw new UnsupportedOperationException("Cannot read data task.");
    } else {
      switch (task.file().format()) {
        case PARQUET:
          iter = newParquetIterable(task, schema, idToConstant);
          break;
        case ORC:
          iter = newOrcIterable(task, schema, idToConstant);
          break;
        default:
          throw new UnsupportedOperationException(
              "Cannot read unknown format: " + task.file().format());
      }
    }

    return iter;
  }
Abstract implementation of iceberg data reader consuming {@link MixedFileScanTask}.

@param <T> to indicate the record data type.
amoro-format-iceberg/src/main/java/org/apache/amoro/io/reader/AbstractUnkeyedDataReader.java