Class ColumnarRowIterator
- java.lang.Object
-
- org.apache.flink.connector.file.src.util.RecyclableIterator<org.apache.flink.table.data.RowData>
-
- org.apache.flink.connector.file.table.ColumnarRowIterator
-
- All Implemented Interfaces:
BulkFormat.RecordIterator<org.apache.flink.table.data.RowData>
@Internal public class ColumnarRowIterator extends RecyclableIterator<org.apache.flink.table.data.RowData>
ABulkFormat.RecordIteratorthat returnsRowDatas. The next row is set byColumnarRowData.setRowId(int).
-
-
Constructor Summary
Constructors Constructor Description ColumnarRowIterator(org.apache.flink.table.data.columnar.ColumnarRowData rowData, Runnable recycler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordAndPosition<org.apache.flink.table.data.RowData>next()Gets the next record from the file, together with its position.voidset(int num, long recordSkipCount)voidset(int num, long offset, long recordSkipCount)Set number rows in this batch and updates the position.-
Methods inherited from class org.apache.flink.connector.file.src.util.RecyclableIterator
releaseBatch
-
-
-
-
Constructor Detail
-
ColumnarRowIterator
public ColumnarRowIterator(org.apache.flink.table.data.columnar.ColumnarRowData rowData, @Nullable Runnable recycler)
-
-
Method Detail
-
set
public void set(int num, long recordSkipCount)- Parameters:
num- number rows in this batch.recordSkipCount- The number of rows that have been returned before this batch.
-
set
public void set(int num, long offset, long recordSkipCount)Set number rows in this batch and updates the position.
-
next
@Nullable public RecordAndPosition<org.apache.flink.table.data.RowData> next()
Description copied from interface:BulkFormat.RecordIteratorGets the next record from the file, together with its position.The position information returned with the record point to the record AFTER the returned record, because it defines the point where the reading should resume once the current record is emitted. The position information is put in the source's state when the record is emitted. If a checkpoint is taken directly after the record is emitted, the checkpoint must to describe where to resume the source reading from after that record.
Objects returned by this method may be reused by the iterator. By the time that this method is called again, no object returned from the previous call will be referenced any more. That makes it possible to have a single
MutableRecordAndPositionobject and return the same instance (with updated record and position) on every call.
-
-