Skip to content

Commit

Permalink
expose CometSchemaImporter in BatchReader
Browse files Browse the repository at this point in the history
  • Loading branch information
huaxingao committed Aug 29, 2024
1 parent f7f0bb1 commit c0f1f6f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
*/
public class BatchReader extends RecordReader<Void, ColumnarBatch> implements Closeable {
private static final Logger LOG = LoggerFactory.getLogger(FileReader.class);
protected static final BufferAllocator ALLOCATOR = new RootAllocator();
public static final BufferAllocator ALLOCATOR = new RootAllocator();

private Configuration conf;
private int capacity;
Expand Down Expand Up @@ -231,6 +231,10 @@ public BatchReader(AbstractColumnReader[] columnReaders) {
this.taskContext = TaskContext$.MODULE$.get();
}

public CometSchemaImporter getImporter() {
return importer;
}

/**
* Initialize this reader. The reason we don't do it in the constructor is that we want to close
* any resource hold by this reader when error happens during the initialization.
Expand Down

0 comments on commit c0f1f6f

Please sign in to comment.