You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Luke Han (JIRA)" <ji...@apache.org> on 2015/08/19 03:25:46 UTC

[jira] [Comment Edited] (KYLIN-751) Max on negative double values is not working

    [ https://issues.apache.org/jira/browse/KYLIN-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14702273#comment-14702273 ] 

Luke Han edited comment on KYLIN-751 at 8/19/15 1:25 AM:
---------------------------------------------------------

With upgrade to calcaite 1.3, this bug already be fixed by calcite


was (Author: lukehan):
Hi Yang, did you have check this issue?

Thanks.

> Max on negative double values is not working
> --------------------------------------------
>
>                 Key: KYLIN-751
>                 URL: https://issues.apache.org/jira/browse/KYLIN-751
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine, REST Service
>    Affects Versions: v0.7.1
>            Reporter: Huang Hua
>            Assignee: liyang
>             Fix For: v0.8.1, v0.7.3
>
>
> I spent some time to debug the kylin code and I think it's very likely a bug in Query module. It keeps returning 4.9E-324 for max of negative values.
> The cube and the fact table was illustrated before in the last couple emails. The query I used was "select id, sum(trans_at), max(trans_at) from max_neg group by id;".
> When the query hit the rest server, it will be passed to the function "private SQLResponse execute(String sql, SQLRequest sqlRequest)" of "QueryService" class in kylin-server module.
> And in that function, it utilizes the calcite to parse the sql and the kylin-storage module to actually fetch data from hbase. However, the following codes of the function packages wrong results.
>             while (resultSet.next()) {
>                 for (int i = 0; i < columnCount; i++) {
>                     oneRow.add((resultSet.getString(i + 1))); -- This produce wrong result like [2c9083862fe1d8f00130062167480ce8-213582789, -86.4, 4.9E-324]
>                 }
>                 results.add(new LinkedList<String>(oneRow));
>                 oneRow.clear();
>             }
> I also checked the related functions of kylin-storage, and the results fetched from hbase were all good, for example, the function "public Tuple next()" of "CubeSegmentTupleIterator" class returned [2c9083862fe1d8f00130062167480ce8-0114097017, -59.0, 1, -59.0] and the function "private Object[] convertCurrentRow(ITuple tuple)" of "CubeEnumerator" class also returned [2c9083862fe1d8f00130062167480ce8-0114097017, -59.0, 1, -59.0] which I think both are correct. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)