use of io.prestosql.spi.block.BlockBuilder in project hetu-core by openlookeng.
the class TestShortDecimalType method createTestBlock.
public static Block createTestBlock() {
BlockBuilder blockBuilder = SHORT_DECIMAL_TYPE.createBlockBuilder(null, 15);
SHORT_DECIMAL_TYPE.writeLong(blockBuilder, -1234);
SHORT_DECIMAL_TYPE.writeLong(blockBuilder, -1234);
SHORT_DECIMAL_TYPE.writeLong(blockBuilder, -1234);
SHORT_DECIMAL_TYPE.writeLong(blockBuilder, 2321);
SHORT_DECIMAL_TYPE.writeLong(blockBuilder, 2321);
SHORT_DECIMAL_TYPE.writeLong(blockBuilder, 2321);
SHORT_DECIMAL_TYPE.writeLong(blockBuilder, 2321);
SHORT_DECIMAL_TYPE.writeLong(blockBuilder, 2321);
SHORT_DECIMAL_TYPE.writeLong(blockBuilder, 3321);
SHORT_DECIMAL_TYPE.writeLong(blockBuilder, 3321);
SHORT_DECIMAL_TYPE.writeLong(blockBuilder, 4321);
return blockBuilder.build();
}
use of io.prestosql.spi.block.BlockBuilder in project hetu-core by openlookeng.
the class TestSmallintArrayType method createTestBlock.
public static Block createTestBlock(Type arrayType) {
BlockBuilder blockBuilder = arrayType.createBlockBuilder(null, 4);
arrayType.writeObject(blockBuilder, arrayBlockOf(SMALLINT, 1, 2));
arrayType.writeObject(blockBuilder, arrayBlockOf(SMALLINT, 1, 2, 3));
arrayType.writeObject(blockBuilder, arrayBlockOf(SMALLINT, 1, 2, 3));
arrayType.writeObject(blockBuilder, arrayBlockOf(SMALLINT, 100, 200, 300));
return blockBuilder.build();
}
use of io.prestosql.spi.block.BlockBuilder in project hetu-core by openlookeng.
the class TestTimeType method createTestBlock.
public static Block createTestBlock() {
BlockBuilder blockBuilder = TIME.createBlockBuilder(null, 15);
TIME.writeLong(blockBuilder, 1111);
TIME.writeLong(blockBuilder, 1111);
TIME.writeLong(blockBuilder, 1111);
TIME.writeLong(blockBuilder, 2222);
TIME.writeLong(blockBuilder, 2222);
TIME.writeLong(blockBuilder, 2222);
TIME.writeLong(blockBuilder, 2222);
TIME.writeLong(blockBuilder, 2222);
TIME.writeLong(blockBuilder, 3333);
TIME.writeLong(blockBuilder, 3333);
TIME.writeLong(blockBuilder, 4444);
return blockBuilder.build();
}
use of io.prestosql.spi.block.BlockBuilder in project hetu-core by openlookeng.
the class TestIntegerVarcharMapType method createTestBlock.
public static Block createTestBlock(Type mapType) {
BlockBuilder blockBuilder = mapType.createBlockBuilder(null, 2);
mapType.writeObject(blockBuilder, mapBlockOf(INTEGER, VARCHAR, ImmutableMap.of(1, "hi")));
mapType.writeObject(blockBuilder, mapBlockOf(INTEGER, VARCHAR, ImmutableMap.of(1, "2", 2, "hello")));
return blockBuilder.build();
}
use of io.prestosql.spi.block.BlockBuilder in project hetu-core by openlookeng.
the class TestIntervalDayTimeType method createTestBlock.
public static Block createTestBlock() {
BlockBuilder blockBuilder = INTERVAL_DAY_TIME.createBlockBuilder(null, 15);
INTERVAL_DAY_TIME.writeLong(blockBuilder, 1111);
INTERVAL_DAY_TIME.writeLong(blockBuilder, 1111);
INTERVAL_DAY_TIME.writeLong(blockBuilder, 1111);
INTERVAL_DAY_TIME.writeLong(blockBuilder, 2222);
INTERVAL_DAY_TIME.writeLong(blockBuilder, 2222);
INTERVAL_DAY_TIME.writeLong(blockBuilder, 2222);
INTERVAL_DAY_TIME.writeLong(blockBuilder, 2222);
INTERVAL_DAY_TIME.writeLong(blockBuilder, 2222);
INTERVAL_DAY_TIME.writeLong(blockBuilder, 3333);
INTERVAL_DAY_TIME.writeLong(blockBuilder, 3333);
INTERVAL_DAY_TIME.writeLong(blockBuilder, 4444);
return blockBuilder.build();
}
Aggregations