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