private static void assertHasOperator(OperatorNode<?> ast, Operator expectedOperator, Supplier<String> errorMessage) {
        try {
            Preconditions.checkArgument(ast.getOperator() == expectedOperator);
        }
        catch (IllegalArgumentException e) {
            throw new IllegalArgumentException(errorMessage.get());
        }

    }
The sorting specified in the YQL+ query last parsed.

@return a Sorting instance or null
container-search/src/main/java/com/yahoo/search/yql/YqlParser.java