Hi Tongxin, I remember Kylin used to use the hive columns' data type as the return type; so it was possible if the metric column was declared with a small scope type like int or double but the aggregated value beyond that; Later there was some change but not sure whether it matches your case;
Pls take a try: change the fact table's column type to decimal, then re-sync the data type to Kylin. After that, re-run the query to see whether the result is updated. 在 2016年6月13日 上午9:25,仇同心 <[email protected]>写道: > 您好: > > 目前kylin版本使用是1.5.2, Cube Designer 中Measures,* Expression **为**SUM, Return > Type **为**DECIMAL* > > > > 这是按日统计的,第一条是hive查询的结果;第二条是kylin查询的结果,科学计数法二者不一样 > > Hive里字段为double类型 > > > > 每天的数据SUM值不同,按维度年来统计导致差距也很大:第一条是kylin查询结果,第二条是hive查询结果。 > > > > 请问:一、kylin精度是怎么处理的,导致和hive不一致? > > 二、Hive中事实表度量字段是double,在Cube Designer时,*Expression **为**SUM, Return > Type **为**DECIMAL**,*那么是kylin在预计算存入hbase时先转成decimal类型得byte吗,还是 > > 查询时转化为decimal返回给客户端呢? > > > > > > > -- Best regards, Shaofeng Shi
