presto-main/src/main/java/io/prestosql/operator/scalar/MapGenericEquality.java/MapGenericEquality/genericEqual
class MapGenericEquality:    public static Boolean genericEqual(
            Type keyType,
            Block leftBlock,
            Block rightBlock,
            EqualityPredicate predicate)
    {
        if (leftBlock.getPositionCount() != rightBlock.getPositionCount()) {
            return false;
        }

        SingleMapBlock leftSingleMapLeftBlock = (SingleMapBlock) leftBlock;
        SingleMapBlock rightSingleMapBlock = (SingleMapBlock) rightBlock;

        boolean indeterminate = false;
        for (int position = 0; position < leftSingleMapLeftBlock.getPositionCount(); position += 2) {
            Object key = readNativeValue(keyType, leftBlock, position);
            int leftPosition = position + 1;
            int rightPosition = rightSingleMapBlock.seekKey(key);
            if (rightPosition == -1) {
                return false;
            }

            try {
                Boolean result = predicate.equals(leftPosition, rightPosition);
                if (result == null) {
                    indeterminate = true;
                }
                else if (!result) {
                    return false;
                }
            }
            catch (Throwable t) {
                throw internalError(t);
            }
        }

        if (indeterminate) {
            return null;
        }
        return true;
    }