public interface TransformableRowIterator extends RowIterator
RowIterator.getPointer()
contract, that allows to transform iterated
rows without allocations on each iterations, and reuse the mechanics of the underlying iterator. See IndexMerger.toMergedIndexRowIterator(org.apache.druid.segment.TransformableRowIterator, int, java.util.List<org.apache.druid.segment.DimensionMergerV9>)
for an example.Modifier and Type | Method and Description |
---|---|
TimeAndDimsPointer |
getMarkedPointer()
Returns a pointer to the row, that was the current row when
RowIterator.mark() was called for the last time. |
RowPointer |
getPointer()
Returns a pointer to the current row.
|
hasTimeAndDimsChangedSinceMark, mark
close, moveToNext
RowPointer getPointer()
TimeAndDimsIterator.moveToNext()
call that returns true
.
Other aspects of the behaviour of this method are the same as in the generic RowIterator.getPointer()
contract.getPointer
in interface RowIterator
getPointer
in interface TimeAndDimsIterator
TimeAndDimsPointer getMarkedPointer()
RowIterator.mark()
was called for the last time. This
method always returns the same object, but pointing to different rows after each RowIterator.mark()
call.
This method must not be called before ever calling to TimeAndDimsIterator.moveToNext()
. If the very first call to TimeAndDimsIterator.moveToNext()
returned false
, the behaviour of this method is undefined (it may return a "wrong" pointer,
null, throw an exception, etc.).
This method could be called before the first call to RowIterator.mark()
(it should return the same object as it is
required to return after all subsequent RowIterator.mark()
calls), but the data of the returned pointer should not
be accessed before the first call to RowIterator.mark()
.
This method is used in RowCombiningTimeAndDimsIterator
implementation. getMarkedPointer() returns TimeAndDimsPointer
instead of RowPointer
(like getPointer()
) merely because RowCombiningTimeAndDimsIterator
doesn't need this method to return anything more specific than TimeAndDimsPointer
.Copyright © 2011–2021 The Apache Software Foundation. All rights reserved.