@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; }
@Override public long hash(Block block, int position) { Block array = getObject(block, position); long hash = 0; for (int i = 0; i < array.getPositionCount(); i++) { hash = 31 * hash + hashPosition(elementType, array, i); } return hash; }
@Override public long hash(Block block, int position) { Block arrayBlock = block.getObject(position, Block.class); long result = 1; for (int i = 0; i < arrayBlock.getPositionCount(); i++) { Type elementType = fields.get(i).getType(); result = 31 * result + TypeUtils.hashPosition(elementType, arrayBlock, i); } return result; }
@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; }
@Override public long hash(Block block, int position) { Block array = getObject(block, position); long hash = 0; for (int i = 0; i < array.getPositionCount(); i++) { hash = 31 * hash + hashPosition(elementType, array, i); } return hash; }
@Override public long hash(Block block, int position) { Block arrayBlock = block.getObject(position, Block.class); long result = 1; for (int i = 0; i < arrayBlock.getPositionCount(); i++) { Type elementType = fields.get(i).getType(); result = 31 * result + TypeUtils.hashPosition(elementType, arrayBlock, i); } return result; }