RussellSpitzer commented on code in PR #10943: URL: https://github.com/apache/iceberg/pull/10943#discussion_r1835096536
########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkBatch.java: ########## @@ -114,16 +132,29 @@ private String[][] computePreferredLocations() { @Override public PartitionReaderFactory createReaderFactory() { if (useParquetBatchReads()) { - int batchSize = readConf.parquetBatchSize(); - return new SparkColumnarReaderFactory(batchSize); + return new SparkColumnarReaderFactory(parquetBatchReadConf()); } else if (useOrcBatchReads()) { - int batchSize = readConf.orcBatchSize(); - return new SparkColumnarReaderFactory(batchSize); + return new SparkColumnarReaderFactory(orcBatchReadConf()); } else { - return new SparkRowReaderFactory(); + return new SparkRowReaderFactory(pushedLimit); + } + } + + private ParquetBatchReadConf parquetBatchReadConf() { + ImmutableParquetBatchReadConf.Builder builder = + ImmutableParquetBatchReadConf.builder().batchSize(readConf.parquetBatchSize()); + + if (pushedLimit != null && pushedLimit >= 1) { + builder.limit(pushedLimit); } + + return builder.build(); + } + + private OrcBatchReadConf orcBatchReadConf() { + return ImmutableOrcBatchReadConf.builder().batchSize(readConf.parquetBatchSize()).build(); Review Comment: orcBatchSize? -- 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