Search in sources :

Example 6 with BlockEncoding

use of io.trino.spi.block.BlockEncoding in project trino by trinodb.

the class BlockEncodingManager method addBlockEncoding.

public void addBlockEncoding(BlockEncoding blockEncoding) {
    requireNonNull(blockEncoding, "blockEncoding is null");
    BlockEncoding existingEntry = blockEncodings.putIfAbsent(blockEncoding.getName(), blockEncoding);
    checkArgument(existingEntry == null, "Encoding already registered: %s", blockEncoding.getName());
}
Also used : VariableWidthBlockEncoding(io.trino.spi.block.VariableWidthBlockEncoding) MapBlockEncoding(io.trino.spi.block.MapBlockEncoding) RunLengthBlockEncoding(io.trino.spi.block.RunLengthBlockEncoding) IntArrayBlockEncoding(io.trino.spi.block.IntArrayBlockEncoding) LongArrayBlockEncoding(io.trino.spi.block.LongArrayBlockEncoding) SingleRowBlockEncoding(io.trino.spi.block.SingleRowBlockEncoding) RowBlockEncoding(io.trino.spi.block.RowBlockEncoding) ArrayBlockEncoding(io.trino.spi.block.ArrayBlockEncoding) ByteArrayBlockEncoding(io.trino.spi.block.ByteArrayBlockEncoding) BlockEncoding(io.trino.spi.block.BlockEncoding) SingleMapBlockEncoding(io.trino.spi.block.SingleMapBlockEncoding) Int128ArrayBlockEncoding(io.trino.spi.block.Int128ArrayBlockEncoding) Int96ArrayBlockEncoding(io.trino.spi.block.Int96ArrayBlockEncoding) DictionaryBlockEncoding(io.trino.spi.block.DictionaryBlockEncoding) ShortArrayBlockEncoding(io.trino.spi.block.ShortArrayBlockEncoding) LazyBlockEncoding(io.trino.spi.block.LazyBlockEncoding)

Example 7 with BlockEncoding

use of io.trino.spi.block.BlockEncoding in project trino by trinodb.

the class InternalBlockEncodingSerde method readBlock.

@Override
public Block readBlock(SliceInput input) {
    // read the encoding name
    String encodingName = readLengthPrefixedString(input);
    // look up the encoding factory
    BlockEncoding blockEncoding = blockEncodings.apply(encodingName);
    // load read the encoding factory from the output stream
    return blockEncoding.readBlock(this, input);
}
Also used : BlockEncoding(io.trino.spi.block.BlockEncoding)

Aggregations

BlockEncoding (io.trino.spi.block.BlockEncoding)7 ArrayBlockEncoding (io.trino.spi.block.ArrayBlockEncoding)4 ByteArrayBlockEncoding (io.trino.spi.block.ByteArrayBlockEncoding)4 DictionaryBlockEncoding (io.trino.spi.block.DictionaryBlockEncoding)4 Int128ArrayBlockEncoding (io.trino.spi.block.Int128ArrayBlockEncoding)4 IntArrayBlockEncoding (io.trino.spi.block.IntArrayBlockEncoding)4 LazyBlockEncoding (io.trino.spi.block.LazyBlockEncoding)4 LongArrayBlockEncoding (io.trino.spi.block.LongArrayBlockEncoding)4 RowBlockEncoding (io.trino.spi.block.RowBlockEncoding)4 RunLengthBlockEncoding (io.trino.spi.block.RunLengthBlockEncoding)4 ShortArrayBlockEncoding (io.trino.spi.block.ShortArrayBlockEncoding)4 SingleRowBlockEncoding (io.trino.spi.block.SingleRowBlockEncoding)4 VariableWidthBlockEncoding (io.trino.spi.block.VariableWidthBlockEncoding)4 Block (io.trino.spi.block.Block)2 Int96ArrayBlockEncoding (io.trino.spi.block.Int96ArrayBlockEncoding)2 MapBlockEncoding (io.trino.spi.block.MapBlockEncoding)2 SingleMapBlockEncoding (io.trino.spi.block.SingleMapBlockEncoding)2 InternalFunctionBundleBuilder (io.trino.metadata.InternalFunctionBundle.InternalFunctionBundleBuilder)1 ConnectorFactory (io.trino.spi.connector.ConnectorFactory)1 EventListenerFactory (io.trino.spi.eventlistener.EventListenerFactory)1