use of io.questdb.cairo.map.MapKey in project questdb by bluestreak01.
the class LatestByAllFilteredRecordCursor method buildTreeMap.
@Override
protected void buildTreeMap(SqlExecutionContext executionContext) throws SqlException {
map.clear();
filter.init(this, executionContext);
DataFrame frame;
while ((frame = this.dataFrameCursor.next()) != null) {
final int partitionIndex = frame.getPartitionIndex();
final long rowLo = frame.getRowLo();
final long rowHi = frame.getRowHi() - 1;
recordA.jumpTo(frame.getPartitionIndex(), rowHi);
for (long row = rowHi; row >= rowLo; row--) {
recordA.setRecordIndex(row);
if (filter.getBool(recordA)) {
MapKey key = map.withKey();
key.put(recordA, recordSink);
if (key.create()) {
rows.add(Rows.toRowID(partitionIndex, row));
}
}
}
}
map.clear();
}
use of io.questdb.cairo.map.MapKey in project questdb by bluestreak01.
the class UnionRecordCursor method nextMaster.
private boolean nextMaster() {
if (masterCursor.hasNext()) {
MapKey key = map.withKey();
key.put(record, recordSink);
key.create();
return true;
}
return switchToSlaveCursor();
}
use of io.questdb.cairo.map.MapKey in project questdb by bluestreak01.
the class ExceptRecordCursor method hasNext.
@Override
public boolean hasNext() {
while (masterCursor.hasNext()) {
MapKey key = map.withKey();
key.put(masterRecord, recordSink);
if (key.notFound()) {
return true;
}
interruptor.checkInterrupted();
}
return false;
}
use of io.questdb.cairo.map.MapKey in project questdb by bluestreak01.
the class ExceptRecordCursor method populateSlaveMap.
private void populateSlaveMap(RecordCursor cursor) {
final Record record = cursor.getRecord();
while (cursor.hasNext()) {
MapKey key = map.withKey();
key.put(record, recordSink);
key.createValue();
interruptor.checkInterrupted();
}
}
Aggregations