Package io.delta.kernel.internal.replay
Class PaginatedScanFilesIteratorImpl
Object
io.delta.kernel.internal.replay.PaginatedScanFilesIteratorImpl
- All Implemented Interfaces:
PaginatedScanFilesIterator,CloseableIterator<FilteredColumnarBatch>,Closeable,AutoCloseable,Iterator<FilteredColumnarBatch>
Implementation of
PaginatedScanFilesIterator-
Nested Class Summary
Nested classes/interfaces inherited from interface io.delta.kernel.utils.CloseableIterator
CloseableIterator.BreakableFilterResult -
Constructor Summary
ConstructorsConstructorDescriptionPaginatedScanFilesIteratorImpl(CloseableIterator<FilteredColumnarBatch> baseFilteredScanFilesIter, PaginationContext paginationContext) Constructs a paginated iterator over scan files on top of a given filtered scan files iterator and pagination context. -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.delta.kernel.utils.CloseableIterator
breakableFilter, combine, filter, flatMap, map, takeWhile, toInMemoryListMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
PaginatedScanFilesIteratorImpl
public PaginatedScanFilesIteratorImpl(CloseableIterator<FilteredColumnarBatch> baseFilteredScanFilesIter, PaginationContext paginationContext) Constructs a paginated iterator over scan files on top of a given filtered scan files iterator and pagination context.- Parameters:
baseFilteredScanFilesIter- The underlying scan files iterator with data skipping and partition pruning applied. This iterator serves as the source of filtered scan results for pagination.paginationContext- The pagination context that carries pagination-related information, such as the maximum number of files to return in a page.
-
-
Method Details
-
getCurrentPageToken
Returns a page token representing the position of the last consumed batch, corresponding to the most recentnext()call.Note: This method can be called after the paginated iterator has been closed.
- Specified by:
getCurrentPageTokenin interfacePaginatedScanFilesIterator
-
hasNext
public boolean hasNext()Description copied from interface:CloseableIteratorReturns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)- Specified by:
hasNextin interfaceCloseableIterator<FilteredColumnarBatch>- Specified by:
hasNextin interfaceIterator<FilteredColumnarBatch>- Returns:
- true if the iteration has more elements
-
next
Description copied from interface:CloseableIteratorReturns the next element in the iteration.- Specified by:
nextin interfaceCloseableIterator<FilteredColumnarBatch>- Specified by:
nextin interfaceIterator<FilteredColumnarBatch>- Returns:
- the next element in the iteration
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-