use of org.apache.druid.segment.column.ColumnHolder in project druid by druid-io.
the class QueryableIndexStorageAdapter method populateMinMaxTime.
private void populateMinMaxTime() {
// Compute and cache minTime, maxTime.
final ColumnHolder columnHolder = index.getColumnHolder(ColumnHolder.TIME_COLUMN_NAME);
try (final NumericColumn column = (NumericColumn) columnHolder.getColumn()) {
this.minTime = DateTimes.utc(column.getLongSingleValueRow(0));
this.maxTime = DateTimes.utc(column.getLongSingleValueRow(column.length() - 1));
}
}
use of org.apache.druid.segment.column.ColumnHolder in project druid by druid-io.
the class QueryableIndexIndexableAdapter method getBitmapIndex.
@VisibleForTesting
BitmapValues getBitmapIndex(String dimension, String value) {
final ColumnHolder columnHolder = input.getColumnHolder(dimension);
if (columnHolder == null) {
return BitmapValues.EMPTY;
}
final BitmapIndex bitmaps = columnHolder.getBitmapIndex();
if (bitmaps == null) {
return BitmapValues.EMPTY;
}
return new ImmutableBitmapValues(bitmaps.getBitmap(bitmaps.getIndex(value)));
}
use of org.apache.druid.segment.column.ColumnHolder in project druid by druid-io.
the class QueryableIndexIndexableAdapter method getBitmapValues.
@Override
public BitmapValues getBitmapValues(String dimension, int dictId) {
final ColumnHolder columnHolder = input.getColumnHolder(dimension);
if (columnHolder == null) {
return BitmapValues.EMPTY;
}
final BitmapIndex bitmaps = columnHolder.getBitmapIndex();
if (bitmaps == null) {
return BitmapValues.EMPTY;
}
if (dictId >= 0) {
return new ImmutableBitmapValues(bitmaps.getBitmap(dictId));
} else {
return BitmapValues.EMPTY;
}
}
Aggregations