@Override
    public void endVisitCompare(Compare.Operator operator) {
        Object rightOperand = this.conditionOperands.pop();
        Object leftOperand = this.conditionOperands.pop();
        if (!(rightOperand instanceof String) && !(leftOperand instanceof String)) {
            this.conditionOperands.push(
                    Expression.compare(
                            ((Expression) leftOperand), operator, ((Expression) rightOperand)
                    )
            );
        } else {
            this.conditionOperands.push("true");
        }
    }
Visitor class to reduce on condition Expression
modules/siddhi-core/src/main/java/io/siddhi/core/aggregation/AggregationExpressionVisitor.java