@Override
    public void endVisitNot() {
        Object operand = this.conditionOperands.pop();
        if (operand instanceof String) {
            this.conditionOperands.push("true");
        } else {
            this.conditionOperands.push(Expression.not((Expression) operand));
        }
    }
Visitor class to reduce on condition Expression
modules/siddhi-core/src/main/java/io/siddhi/core/aggregation/AggregationExpressionVisitor.java