public void endVisitAttributeFunction(String namespace, String functionName, int numAttributeOperand) {
        Expression[] expressions = new Expression[numAttributeOperand];
        boolean toReduce = false;
        for (int i = 0; i < numAttributeOperand; i++) {
            Object operand = this.conditionOperands.pop();
            if (operand instanceof String) {
                toReduce = true;
                break;
            } else {
                expressions[numAttributeOperand - 1 - i] = ((Expression) operand);
            }
        }
        if (!toReduce) {
            this.conditionOperands.push(Expression.function(namespace, functionName, expressions));
        } else {
            this.conditionOperands.push("true");
        }
    }
Visitor class to reduce on condition Expression
modules/siddhi-core/src/main/java/io/siddhi/core/aggregation/AggregationExpressionVisitor.java