private static Attribute.Type parseArithmeticOperationResultType(ExpressionExecutor leftExpressionExecutor,
                                                                     ExpressionExecutor rightExpressionExecutor) {
        if (leftExpressionExecutor.getReturnType() == Attribute.Type.DOUBLE
                || rightExpressionExecutor.getReturnType() == Attribute.Type.DOUBLE) {
            return Attribute.Type.DOUBLE;
        } else if (leftExpressionExecutor.getReturnType() == Attribute.Type.FLOAT
                || rightExpressionExecutor.getReturnType() == Attribute.Type.FLOAT) {
            return Attribute.Type.FLOAT;
        } else if (leftExpressionExecutor.getReturnType() == Attribute.Type.LONG
                || rightExpressionExecutor.getReturnType() == Attribute.Type.LONG) {
            return Attribute.Type.LONG;
        } else if (leftExpressionExecutor.getReturnType() == Attribute.Type.INT
                || rightExpressionExecutor.getReturnType() == Attribute.Type.INT) {
            return Attribute.Type.INT;
        } else {
            throw new ArithmeticException("Arithmetic operation between " + leftExpressionExecutor.getReturnType()
                    + " and " + rightExpressionExecutor.getReturnType() + " cannot be executed");
        }
    }
Calculate the return type of arithmetic operation executors.(Ex: add, subtract, etc)

@param leftExpressionExecutor  left ExpressionExecutor
@param rightExpressionExecutor right ExpressionExecutor
@return Attribute Type
modules/siddhi-core/src/main/java/io/siddhi/core/util/parser/ExpressionParser.java