public void addVariableExpression(Expression expression) {
        Variable variable = (Variable) expression;
        String streamId = variable.getStreamId();
        if (streamId == null) {
            if (this.allAttributesList.contains(variable.getAttributeName())) {
                this.conditionOperands.push(expression);
            } else {
                this.conditionOperands.push("true");
            }
        } else {
            if (streamId.equals(inputStreamRefId)) {
                this.conditionOperands.push(expression);
            } else if (this.tableAttributesNameList.contains(variable.getAttributeName())) {
                this.conditionOperands.push(expression);
            } else {
                this.conditionOperands.push("true");
            }
        }

    }
Visitor class to reduce on condition Expression
modules/siddhi-core/src/main/java/io/siddhi/core/aggregation/AggregationExpressionVisitor.java