use of org.apache.druid.segment.column.DoublesColumn in project druid by druid-io.
the class NumericNullColumnSelectorTest method testDoubleSelectorWithNullsCanResetOffset.
@Test
public void testDoubleSelectorWithNullsCanResetOffset() {
for (ImmutableBitmap bitmap : bitmaps) {
ColumnarDoubles doubles = new ColumnarDoubles() {
@Override
public int size() {
return numRows;
}
@Override
public double get(int index) {
return ThreadLocalRandom.current().nextDouble();
}
@Override
public void close() {
}
};
DoublesColumn columnWithNulls = DoublesColumn.create(doubles, bitmap);
ColumnValueSelector<?> selector = columnWithNulls.makeColumnValueSelector(offset);
assertOffsetCanReset(selector, bitmap, offset);
VectorValueSelector vectorSelector = columnWithNulls.makeVectorValueSelector(vectorOffset);
assertVectorOffsetCanReset(vectorSelector, bitmap, vectorOffset);
}
}
Aggregations