use of io.prestosql.spi.block.MapBlock in project hetu-core by openlookeng.
the class MapType method hash.
@Override
public long hash(Block block, int position) {
Block mapBlock = getObject(block, position);
long result = 0;
for (int i = 0; i < mapBlock.getPositionCount(); i += 2) {
result += hashPosition(keyType, mapBlock, i) ^ hashPosition(valueType, mapBlock, i + 1);
}
return result;
}
Aggregations