public void visit(ComparisonNode node) {
        if (state != null) {
            throw new IllegalArgumentException("Comparison cannot be done within now expression");
        }
        if (!hasNow(node)) {
            return;
        }
        state = new BuildState();
        node.getLHS().accept(this);
        node.getRHS().accept(this);

        if (!">".equals(node.getOperator())) {
            throw new IllegalArgumentException("Comparison operator '" + node.getOperator() + "' is not supported");
        }
        if (!(node.getLHS() instanceof AttributeNode)) {
            throw new IllegalArgumentException("Left hand side of comparison must be a document field");
        }
        state.comparison = node;
        if (state.attribute != null &&
            (state.arithmetic != null || state.now != null)) {
            NowQueryExpression expression = new NowQueryExpression(state.attribute, state.comparison, state.arithmetic);
            expressionMap.put(expression.getDocumentType(), expression);
            state = null;
        }
    }
Class which converts a selection tree into a set of queries per document type.
If unsupported operations are or illegal arguments are encountered, an exception is thrown.

@author Ulf Lilleengen
document/src/main/java/com/yahoo/document/select/convert/SelectionExpressionConverter.java