Search in sources :

Example 11 with BlockPositionEqual

use of io.trino.type.BlockTypeOperators.BlockPositionEqual in project trino by trinodb.

the class TestValueStore method setUp.

@BeforeMethod(alwaysRun = true)
public void setUp() {
    VarcharType type = VarcharType.createVarcharType(100);
    BlockTypeOperators blockTypeOperators = new BlockTypeOperators(new TypeOperators());
    BlockPositionEqual equalOperator = blockTypeOperators.getEqualOperator(type);
    hashCodeOperator = blockTypeOperators.getHashCodeOperator(type);
    BlockBuilder blockBuilder = type.createBlockBuilder(null, 100, 10);
    valueStore = new ValueStore(type, equalOperator, 100, blockBuilder);
    valueStoreSmall = new ValueStore(type, equalOperator, 1, blockBuilder);
    block = BlockAssertions.createStringsBlock("a", "b", "c", "d");
}
Also used : BlockPositionEqual(io.trino.type.BlockTypeOperators.BlockPositionEqual) BlockTypeOperators(io.trino.type.BlockTypeOperators) VarcharType(io.trino.spi.type.VarcharType) BlockTypeOperators(io.trino.type.BlockTypeOperators) TypeOperators(io.trino.spi.type.TypeOperators) BlockBuilder(io.trino.spi.block.BlockBuilder) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

BlockPositionEqual (io.trino.type.BlockTypeOperators.BlockPositionEqual)11 Type (io.trino.spi.type.Type)7 BlockPositionHashCode (io.trino.type.BlockTypeOperators.BlockPositionHashCode)7 TypeSignature.mapType (io.trino.spi.type.TypeSignature.mapType)6 AccumulatorStateDescriptor (io.trino.operator.aggregation.AggregationMetadata.AccumulatorStateDescriptor)4 MapType (io.trino.spi.type.MapType)4 Block (io.trino.spi.block.Block)3 MethodHandle (java.lang.invoke.MethodHandle)3 AggregationMetadata (io.trino.operator.aggregation.AggregationMetadata)2 KeyValuePairStateSerializer (io.trino.operator.aggregation.state.KeyValuePairStateSerializer)2 KeyValuePairsStateFactory (io.trino.operator.aggregation.state.KeyValuePairsStateFactory)2 BlockTypeOperators (io.trino.type.BlockTypeOperators)2 ImmutableList (com.google.common.collect.ImmutableList)1 PagesHashStrategy (io.trino.operator.PagesHashStrategy)1 SimplePagesHashStrategy (io.trino.operator.SimplePagesHashStrategy)1 Page (io.trino.spi.Page)1 PageBuilder (io.trino.spi.PageBuilder)1 TrinoException (io.trino.spi.TrinoException)1 BlockBuilder (io.trino.spi.block.BlockBuilder)1 ArrayType (io.trino.spi.type.ArrayType)1