6565
6666import org .apache .comet .CometConf ;
6767import org .apache .comet .CometSchemaImporter ;
68+ import org .apache .comet .IcebergApi ;
6869import org .apache .comet .shims .ShimBatchReader ;
6970import org .apache .comet .shims .ShimFileFormat ;
7071import org .apache .comet .vector .CometVector ;
8788 * }
8889 * </pre>
8990 */
91+ @ IcebergApi
9092public class BatchReader extends RecordReader <Void , ColumnarBatch > implements Closeable {
9193 private static final Logger LOG = LoggerFactory .getLogger (FileReader .class );
9294 protected static final BufferAllocator ALLOCATOR = new RootAllocator ();
@@ -186,9 +188,9 @@ public BatchReader(
186188 }
187189
188190 /**
189- * @deprecated since 0.10.0, will be removed in 0.11.0.
190191 * @see <a href="https://github.com/apache/datafusion-comet/issues/2079">Comet Issue #2079</a>
191192 */
193+ @ IcebergApi
192194 public BatchReader (AbstractColumnReader [] columnReaders ) {
193195 // Todo: set useDecimal128 and useLazyMaterialization
194196 int numColumns = columnReaders .length ;
@@ -384,17 +386,17 @@ public void init() throws URISyntaxException, IOException {
384386 }
385387
386388 /**
387- * @deprecated since 0.10.0, will be removed in 0.11.0.
388389 * @see <a href="https://github.com/apache/datafusion-comet/issues/2079">Comet Issue #2079</a>
389390 */
391+ @ IcebergApi
390392 public void setSparkSchema (StructType schema ) {
391393 this .sparkSchema = schema ;
392394 }
393395
394396 /**
395- * @deprecated since 0.10.0, will be removed in 0.11.0.
396397 * @see <a href="https://github.com/apache/datafusion-comet/issues/2079">Comet Issue #2079</a>
397398 */
399+ @ IcebergApi
398400 public AbstractColumnReader [] getColumnReaders () {
399401 return columnReaders ;
400402 }
@@ -498,6 +500,7 @@ public boolean nextBatch() throws IOException {
498500 return nextBatch (batchSize );
499501 }
500502
503+ @ IcebergApi
501504 public boolean nextBatch (int batchSize ) {
502505 long totalDecodeTime = 0 , totalLoadTime = 0 ;
503506 for (int i = 0 ; i < columnReaders .length ; i ++) {
@@ -524,6 +527,7 @@ public boolean nextBatch(int batchSize) {
524527 return true ;
525528 }
526529
530+ @ IcebergApi
527531 @ Override
528532 public void close () throws IOException {
529533 if (columnReaders != null ) {
0 commit comments