Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-751

Max on negative double values is not working

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              liyang.gmt8@gmail.com liyang
              huanghua Huang Hua
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: