use of io.questdb.cairo.map.MapRecord in project questdb by bluestreak01.
the class AbstractSampleByFillValueRecordCursor method toTop.
@Override
public void toTop() {
super.toTop();
if (base.hasNext()) {
baseRecord = base.getRecord();
int n = groupByFunctions.size();
RecordCursor mapCursor = map.getCursor();
MapRecord mapRecord = map.getRecord();
while (mapCursor.hasNext()) {
MapValue value = mapRecord.getValue();
// timestamp is always stored in value field 0
value.putLong(0, Numbers.LONG_NaN);
// this would set values for when keys are not found right away
for (int i = 0; i < n; i++) {
groupByFunctions.getQuick(i).setNull(value);
}
}
}
}
use of io.questdb.cairo.map.MapRecord in project questdb by bluestreak01.
the class SampleByFillPrevRecordCursor method toTop.
@Override
public void toTop() {
super.toTop();
if (base.hasNext()) {
baseRecord = base.getRecord();
int n = groupByFunctions.size();
RecordCursor mapCursor = map.getCursor();
MapRecord mapRecord = map.getRecord();
while (mapCursor.hasNext()) {
MapValue value = mapRecord.getValue();
// timestamp is always stored in value field 0
value.putLong(0, Numbers.LONG_NaN);
// this would set values for when keys are not found right away
for (int i = 0; i < n; i++) {
groupByFunctions.getQuick(i).setNull(value);
}
}
}
}
Aggregations