Search in sources :

Example 1 with ColumnarMultiIntsSerializer

use of org.apache.druid.segment.data.ColumnarMultiIntsSerializer in project druid by druid-io.

the class DictionaryEncodedColumnMerger method processMergedRow.

@Override
public void processMergedRow(ColumnValueSelector selector) throws IOException {
    IndexedInts row = getRow(selector);
    int rowSize = row.size();
    if (rowSize == 0) {
        nullRowsBitmap.add(rowCount);
    } else if (hasNull && isNullRow(row, rowSize)) {
        // If this dimension has the null/empty str in its dictionary, a row with nulls at all positions should also be
        // added to nullRowBitmap.
        nullRowsBitmap.add(rowCount);
    }
    if (encodedValueSerializer instanceof ColumnarMultiIntsSerializer) {
        ((ColumnarMultiIntsSerializer) encodedValueSerializer).addValues(row);
    } else {
        int value = row.size() == 0 ? 0 : row.get(0);
        ((SingleValueColumnarIntsSerializer) encodedValueSerializer).addValue(value);
    }
    rowCount++;
}
Also used : SingleValueColumnarIntsSerializer(org.apache.druid.segment.data.SingleValueColumnarIntsSerializer) IndexedInts(org.apache.druid.segment.data.IndexedInts) ColumnarMultiIntsSerializer(org.apache.druid.segment.data.ColumnarMultiIntsSerializer) VSizeColumnarMultiIntsSerializer(org.apache.druid.segment.data.VSizeColumnarMultiIntsSerializer) V3CompressedVSizeColumnarMultiIntsSerializer(org.apache.druid.segment.data.V3CompressedVSizeColumnarMultiIntsSerializer)

Aggregations

ColumnarMultiIntsSerializer (org.apache.druid.segment.data.ColumnarMultiIntsSerializer)1 IndexedInts (org.apache.druid.segment.data.IndexedInts)1 SingleValueColumnarIntsSerializer (org.apache.druid.segment.data.SingleValueColumnarIntsSerializer)1 V3CompressedVSizeColumnarMultiIntsSerializer (org.apache.druid.segment.data.V3CompressedVSizeColumnarMultiIntsSerializer)1 VSizeColumnarMultiIntsSerializer (org.apache.druid.segment.data.VSizeColumnarMultiIntsSerializer)1