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

Dong Li closed KYLIN-1524.
--------------------------

Resolved in release 1.5.1 (2016-04-13)

> Get "java.lang.Double cannot be cast to java.lang.Long" error when Top-N 
> metris data type is BigInt
> ---------------------------------------------------------------------------------------------------
>
>                 Key: KYLIN-1524
>                 URL: https://issues.apache.org/jira/browse/KYLIN-1524
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: v1.5.0
>            Reporter: Shaofeng SHI
>            Assignee: Shaofeng SHI
>             Fix For: v1.5.1
>
>
> Create a cube whose top-n metrics's column data type is BigInt; The cube is 
> built successfully, then send a top-n query, like:
> select entity_id, sum(price)  a from fact_table where cal_dt > '2015-01-01' 
> group by entity_id order by a desc limit 10
> Get error ""java.lang.Double cannot be cast to java.lang.Long";
> Then try to use CAST but still get the error:
> select entity_id, cast(sum(price) as DECIMAL(9,2)) a from fact_table where 
> cal_dt > '2015-01-01' group by entity_id order by a desc limit 10
> In kylin.log:
> {code}
> Caused by: java.lang.ClassCastException: java.lang.Double cannot be cast to 
> java.lang.Long
>         at Baz$4.apply(Unknown Source)
>         at Baz$4.apply(Unknown Source)
>         at Baz$4.apply(Unknown Source)
>         at 
> org.apache.calcite.linq4j.EnumerableDefaults.groupBy_(EnumerableDefaults.java:825)
>         at 
> org.apache.calcite.linq4j.EnumerableDefaults.groupBy(EnumerableDefaults.java:754)
>         at 
> org.apache.calcite.linq4j.DefaultEnumerable.groupBy(DefaultEnumerable.java:302)
>         at Baz.bind(Unknown Source)
>         at 
> org.apache.calcite.jdbc.CalcitePrepare$CalciteSignature.enumerable(CalcitePrepare.java:326)
>         at 
> org.apache.calcite.jdbc.CalciteConnectionImpl.enumerable(CalciteConnectionImpl.java:281)
>         at 
> org.apache.calcite.jdbc.CalciteMetaImpl._createIterable(CalciteMetaImpl.java:545)
>         at 
> org.apache.calcite.jdbc.CalciteMetaImpl.createIterable(CalciteMetaImpl.java:536)
>         at 
> org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:187)
>         at 
> org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:65)
>         at 
> org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:44)
>         at 
> org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:566)
>         at 
> org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:578)
>         at 
> org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:571)
>         at 
> org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:135)
>         ... 79 more
> {code}
>  



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

Reply via email to