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());
}
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);
}
Aggregations