如何在存储的雅典娜中获取双精度值以显示为整数

How to get double values in athena stored to be shown as Integers

目前我们有一个双精度类型的数据库列,所有值都以指数格式存储

0055828993167 存储为 5.5828993167E10 在获取值时,我们总是需要转换回长值 new BigDecimal(5.5828993167E10).longValueExact()

As this has to done in almost all places and we cannot change the column type, can we some how cast the double -> long in athena while querying the results ?

documentation 很少:(

要获得 long 值的等价物,请执行 CAST(the_column AS BIGINT)