use of io.druid.segment.DimensionSelector in project druid by druid-io.
the class VirtualColumnsTest method testMakeSelectorsWithDotSupportBaseNameOnly.
@Test
public void testMakeSelectorsWithDotSupportBaseNameOnly() {
final VirtualColumns virtualColumns = makeVirtualColumns();
final ObjectColumnSelector objectSelector = virtualColumns.makeObjectColumnSelector("foo", null);
final DimensionSelector dimensionSelector = virtualColumns.makeDimensionSelector(new DefaultDimensionSpec("foo", "x"), null);
final FloatColumnSelector floatSelector = virtualColumns.makeFloatColumnSelector("foo", null);
final LongColumnSelector longSelector = virtualColumns.makeLongColumnSelector("foo", null);
Assert.assertEquals(-1L, objectSelector.get());
Assert.assertEquals("-1", dimensionSelector.lookupName(dimensionSelector.getRow().get(0)));
Assert.assertEquals(-1.0f, floatSelector.get(), 0.0f);
Assert.assertEquals(-1L, longSelector.get());
}
Aggregations