1

Flink throwed ArithmeticException(on-terminating decimal expansion no exact representable decimal result) when I executed below query:

SELECT productId, COUNT(order), COUNT(order)/100.0
From product
GROUP BY productId

I can't find a way from the document or google to get rid of this issue. Thanks.

4

1 回答 1

1

该异常将在即将发布的 Flink 1.5 版本中修复。本期对此进行了说明。作为一种解决方法,您可以简单地转换为 double precision CAST(x AS DOUBLE)BigDecimal只有 Java类型 (SQL )的算术DECIMAL会受到影响。

于 2018-04-06T14:00:59.337 回答