use of com.facebook.presto.spi.block.BlockEncoding in project presto by prestodb.
the class AbstractTestBlock method copyBlock.
private static Block copyBlock(Block block) {
DynamicSliceOutput sliceOutput = new DynamicSliceOutput(1024);
BlockEncoding blockEncoding = block.getEncoding();
blockEncoding.writeBlock(sliceOutput, block);
return blockEncoding.readBlock(sliceOutput.slice().getInput());
}
use of com.facebook.presto.spi.block.BlockEncoding in project presto by prestodb.
the class BlockSerdeUtil method writeBlock.
public static void writeBlock(BlockEncodingSerde blockEncodingSerde, SliceOutput output, Block block) {
BlockEncoding encoding = block.getEncoding();
blockEncodingSerde.writeBlockEncoding(output, encoding);
encoding.writeBlock(output, block);
}
use of com.facebook.presto.spi.block.BlockEncoding in project presto by prestodb.
the class BlockSerdeUtil method writeBlock.
// This class is only used in LiteralInterpreter for magic literal. Most likely, you shouldn't use it from anywhere else.
public static void writeBlock(SliceOutput output, Block block) {
BlockEncoding encoding = block.getEncoding();
BlockEncodingManager.writeBlockEncodingInternal(output, encoding);
encoding.writeBlock(output, block);
}
Aggregations