Search in sources :

Example 1 with BytesHashMap

use of org.apache.flink.table.runtime.util.collections.binary.BytesHashMap in project flink by apache.

the class SumHashAggTestOperator method open.

@Override
public void open() throws Exception {
    super.open();
    aggregateMap = new BytesHashMap(getOwner(), getMemoryManager(), memorySize, keyTypes, aggBufferTypes);
    currentKey = new BinaryRowData(1);
    currentKeyWriter = new BinaryRowWriter(currentKey);
    emptyAggBuffer = new BinaryRowData(1);
    // for null value
    BinaryRowWriter emptyAggBufferWriter = new BinaryRowWriter(emptyAggBuffer);
    emptyAggBufferWriter.reset();
    emptyAggBufferWriter.setNullAt(0);
    emptyAggBufferWriter.complete();
}
Also used : BinaryRowData(org.apache.flink.table.data.binary.BinaryRowData) BinaryRowWriter(org.apache.flink.table.data.writer.BinaryRowWriter) BytesHashMap(org.apache.flink.table.runtime.util.collections.binary.BytesHashMap)

Aggregations

BinaryRowData (org.apache.flink.table.data.binary.BinaryRowData)1 BinaryRowWriter (org.apache.flink.table.data.writer.BinaryRowWriter)1 BytesHashMap (org.apache.flink.table.runtime.util.collections.binary.BytesHashMap)1