Hive SQL Impala 关于round被cast为string后保留小数位数功能失效的解决方法
select cast(round(5.8976,3) as string)
--------------------------------------
--会返回 ‘5.8976’
需要把round产生的double数据更改为decimal类型再进行转化
select cast(cast(round(5.8976,3) as decimal(9,2)) as string)
--------------------------------------
--会返回 ‘5.90’