Search in sources :

Example 1 with CompressedColumnarFloatsSupplier

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

the class FloatNumericColumnPartSerde method getDeserializer.

@Override
public Deserializer getDeserializer() {
    return new Deserializer() {

        @Override
        public void read(ByteBuffer buffer, ColumnBuilder builder, ColumnConfig columnConfig) {
            final CompressedColumnarFloatsSupplier column = CompressedColumnarFloatsSupplier.fromByteBuffer(buffer, byteOrder);
            FloatNumericColumnSupplier columnSupplier = new FloatNumericColumnSupplier(column, IndexIO.LEGACY_FACTORY.getBitmapFactory().makeEmptyImmutableBitmap());
            builder.setType(ValueType.FLOAT).setHasMultipleValues(false).setNumericColumnSupplier(columnSupplier);
        }
    };
}
Also used : CompressedColumnarFloatsSupplier(org.apache.druid.segment.data.CompressedColumnarFloatsSupplier) ColumnConfig(org.apache.druid.segment.column.ColumnConfig) ColumnBuilder(org.apache.druid.segment.column.ColumnBuilder) ByteBuffer(java.nio.ByteBuffer)

Aggregations

ByteBuffer (java.nio.ByteBuffer)1 ColumnBuilder (org.apache.druid.segment.column.ColumnBuilder)1 ColumnConfig (org.apache.druid.segment.column.ColumnConfig)1 CompressedColumnarFloatsSupplier (org.apache.druid.segment.data.CompressedColumnarFloatsSupplier)1