Search in sources :

Example 1 with CursorResultIterator

use of org.apache.phoenix.iterate.CursorResultIterator in project phoenix by apache.

the class CursorFetchPlan method iterator.

@Override
public ResultIterator iterator(ParallelScanGrouper scanGrouper, Scan scan) throws SQLException {
    StatementContext context = delegate.getContext();
    if (resultIterator == null) {
        context.getOverallQueryMetrics().startQuery();
        resultIterator = new CursorResultIterator(LookAheadResultIterator.wrap(delegate.iterator(scanGrouper, scan)), cursorName);
    }
    return resultIterator;
}
Also used : CursorResultIterator(org.apache.phoenix.iterate.CursorResultIterator) StatementContext(org.apache.phoenix.compile.StatementContext)

Aggregations

StatementContext (org.apache.phoenix.compile.StatementContext)1 CursorResultIterator (org.apache.phoenix.iterate.CursorResultIterator)1