Support `(str->long)` and `(str->int)` cast statements in OAL core engine. (#7907)
Enhance OAL engine core * Fix `funcParamExpression` and `literalExpression` can't be used in the same aggregation function. * Support cast statement in the OAL core engine. * Support `(str->long)` and `(long)` for string to long cast statement. * Support `(str->int)` and `(int)` for string to int cast statement. * Support Long literal number in the OAL core engine. * Support literal `string` as parameter of aggregation function. * Add `attributeExpression` and `attributeExpressionSegment` in the OAL grammar tree to support `map` type for the attribute expression. Besides added UTs, I locally tested these OAL scripts ``` mq_consume_latency = from((str->long)Service.tag["transmission.latency"]).longAvg(); mq_consume_latency = from((long)Service.tag["transmission.latency"]).longAvg(); mq_consume_latency = from((str->long)Service.tag["transmission.latency"]).filter((str->long)tag["transmission.latency"] > 0L).longAvg(); ```
Showing
想要评论请 注册 或 登录