Search in sources :

Example 1 with Int128ArrayBlockBuilder

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

the class TestInt128ArrayBlock method createBlockBuilderWithValues.

private static BlockBuilder createBlockBuilderWithValues(Slice[] expectedValues) {
    Int128ArrayBlockBuilder blockBuilder = new Int128ArrayBlockBuilder(null, expectedValues.length);
    writeValues(expectedValues, blockBuilder);
    return blockBuilder;
}
Also used : Int128ArrayBlockBuilder(io.trino.spi.block.Int128ArrayBlockBuilder)

Example 2 with Int128ArrayBlockBuilder

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

the class TestLongDecimalType method decimalAsBlock.

private Block decimalAsBlock(String value) {
    Int128 decimal = Decimals.valueOf(new BigDecimal(value));
    BlockBuilder blockBuilder = new Int128ArrayBlockBuilder(null, 1);
    TYPE.writeObject(blockBuilder, decimal);
    return blockBuilder.build();
}
Also used : Int128ArrayBlockBuilder(io.trino.spi.block.Int128ArrayBlockBuilder) BigDecimal(java.math.BigDecimal) BlockBuilder(io.trino.spi.block.BlockBuilder) Int128ArrayBlockBuilder(io.trino.spi.block.Int128ArrayBlockBuilder)

Aggregations

Int128ArrayBlockBuilder (io.trino.spi.block.Int128ArrayBlockBuilder)2 BlockBuilder (io.trino.spi.block.BlockBuilder)1 BigDecimal (java.math.BigDecimal)1