public static String withCast(String castType, String originalExpression) {
        if (castType == null) {
            return originalExpression;
        }
        switch (castType) {
            case "(str->long)":
            case "(long)":
                return "Long.parseLong(" + originalExpression + ")";
            case "(str->int)":
            case "(int)":
                return "Integer.parseInt(" + originalExpression + ")";
            default:
                throw new IllegalArgumentException(
                    "castType:" + castType + " is legal, context expression:" + originalExpression);
        }
    }
@param castType           to change the value of given original expression.
@param originalExpression to read the value
@return cast expression if cast type exists and is legal.
oap-server/oal-rt/src/main/java/org/apache/skywalking/oal/rt/util/TypeCastUtil.java