use of io.druid.segment.DimensionIndexer in project druid by druid-io.
the class IncrementalIndexAdapter method getBitmapIndex.
@Override
public IndexedInts getBitmapIndex(String dimension, int index) {
DimensionAccessor accessor = accessors.get(dimension);
if (accessor == null) {
return EmptyIndexedInts.EMPTY_INDEXED_INTS;
}
ColumnCapabilities capabilities = accessor.dimensionDesc.getCapabilities();
DimensionIndexer indexer = accessor.dimensionDesc.getIndexer();
if (!capabilities.hasBitmapIndexes()) {
return EmptyIndexedInts.EMPTY_INDEXED_INTS;
}
final int id = (Integer) indexer.getUnsortedEncodedValueFromSorted(index);
if (id < 0 || id >= indexer.getCardinality()) {
return EmptyIndexedInts.EMPTY_INDEXED_INTS;
}
MutableBitmap bitmapIndex = accessor.invertedIndexes[id];
if (bitmapIndex == null) {
return EmptyIndexedInts.EMPTY_INDEXED_INTS;
}
return new BitmapIndexedInts(bitmapIndex);
}
use of io.druid.segment.DimensionIndexer in project druid by druid-io.
the class IncrementalIndexAdapter method getDimValueLookup.
@Override
public Indexed<Comparable> getDimValueLookup(String dimension) {
final DimensionAccessor accessor = accessors.get(dimension);
if (accessor == null) {
return null;
}
final DimensionIndexer indexer = accessor.dimensionDesc.getIndexer();
return indexer.getSortedIndexedValues();
}
use of io.druid.segment.DimensionIndexer in project druid by druid-io.
the class IncrementalIndexStorageAdapter method getMaxValue.
@Override
public Comparable getMaxValue(String column) {
IncrementalIndex.DimensionDesc desc = index.getDimension(column);
if (desc == null) {
return null;
}
DimensionIndexer indexer = desc.getIndexer();
return indexer.getMaxValue();
}
Aggregations