use of com.facebook.presto.common.block.RowBlockBuilder in project presto by prestodb.
the class TestSimpleRowType method getGreaterValue.
@Override
protected Object getGreaterValue(Object value) {
RowBlockBuilder blockBuilder = (RowBlockBuilder) TYPE.createBlockBuilder(null, 1);
SingleRowBlockWriter singleRowBlockWriter;
Block block = (Block) value;
singleRowBlockWriter = blockBuilder.beginBlockEntry();
BIGINT.writeLong(singleRowBlockWriter, block.getSingleValueBlock(0).getLong(0) + 1);
VARCHAR.writeSlice(singleRowBlockWriter, block.getSingleValueBlock(1).getSlice(0, 0, 1));
blockBuilder.closeEntry();
return TYPE.getObject(blockBuilder.build(), 0);
}
Aggregations