presto-main/src/main/java/io/prestosql/operator/RowComparator.java/RowComparator/compare
class RowComparator:    @Override
    public int compare(Page leftRow, Page rightRow)
    {
        for (int index = 0; index < sortChannels.size(); index++) {
            Type type = sortTypes.get(index);
            int channel = sortChannels.get(index);
            SortOrder sortOrder = sortOrders.get(index);

            Block left = leftRow.getBlock(channel);
            Block right = rightRow.getBlock(channel);

            int comparison = sortOrder.compareBlockValue(type, left, 0, right, 0);
            if (comparison != 0) {
                return comparison;
            }
        }
        return 0;
    }