[ 
https://issues.apache.org/jira/browse/KYLIN-751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luke Han updated KYLIN-751:
---------------------------
    Fix Version/s: v0.7.3
                   v0.8.1

> 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)

Reply via email to