presto-main/src/main/java/io/prestosql/operator/SimplePageWithPositionComparator.java/SimplePageWithPositionComparator/compareTo
class SimplePageWithPositionComparator:    @Override
    public int compareTo(Page left, int leftPosition, Page right, int rightPosition)
    {
        for (int i = 0; i < sortChannels.size(); i++) {
            int sortChannel = sortChannels.get(i);
            Block leftBlock = left.getBlock(sortChannel);
            Block rightBlock = right.getBlock(sortChannel);

            SortOrder sortOrder = sortOrders.get(i);
            int compare = sortOrder.compareBlockValue(types.get(sortChannel), leftBlock, leftPosition, rightBlock, rightPosition);
            if (compare != 0) {
                return compare;
            }
        }
        return 0;
    }