pvary commented on code in PR #12298: URL: https://github.com/apache/iceberg/pull/12298#discussion_r2001610963
########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/BaseBatchReader.java: ########## @@ -65,76 +59,32 @@ protected CloseableIterable<ColumnarBatch> newBatchIterable( Expression residual, Map<Integer, ?> idToConstant, SparkDeleteFilter deleteFilter) { - switch (format) { - case PARQUET: - return newParquetIterable(inputFile, start, length, residual, idToConstant, deleteFilter); - - case ORC: - return newOrcIterable(inputFile, start, length, residual, idToConstant); - - default: - throw new UnsupportedOperationException( - "Format: " + format + " not supported for batched reads"); - } - } - - private CloseableIterable<ColumnarBatch> newParquetIterable( - InputFile inputFile, - long start, - long length, - Expression residual, - Map<Integer, ?> idToConstant, - SparkDeleteFilter deleteFilter) { - // get required schema if there are deletes Schema requiredSchema = deleteFilter != null ? deleteFilter.requiredSchema() : expectedSchema(); + ReadBuilder<?, ?> readBuilder = + DataFileServiceRegistry.<InternalRow>readBuilder( + format, + ColumnarBatch.class.getName(), Review Comment: Changed to string constants -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org