Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
v1.0
-
None
Description
This is from an eBay internal deployment which deployed with a latest build from 0.7-staging (0.7.3-SNAPSHOT); User reported that running a SQL which got such ClassCastException while it has no problem before; The error trace is:
Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.Double at Baz$4.apply(Unknown Source) at Baz$4.apply(Unknown Source) x at Baz$4.apply(Unknown Source) at org.apache.calcite.linq4j.EnumerableDefaults.groupBy_(EnumerableDefaults.java:737) at org.apache.calcite.linq4j.EnumerableDefaults.groupBy(EnumerableDefaults.java:677) at org.apache.calcite.linq4j.DefaultEnumerable.groupBy(DefaultEnumerable.java:301) at Baz.bind(Unknown Source) at org.apache.calcite.jdbc.CalcitePrepare$CalciteSignature.enumerable(CalcitePrepare.java:281) at org.apache.calcite.jdbc.CalciteConnectionImpl.enumerable(CalciteConnectionImpl.java:235) at org.apache.calcite.jdbc.CalciteMetaImpl.createIterable(CalciteMetaImpl.java:476) at org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:184) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:63) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:42) at org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:473) at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:508) at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:477) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:109) ... 84 more
The SQL is simple, like
select itemid, sum(column_a) from items group by itemid
I noticed the column "column_a" was declared as "float" in hive; After change the type to "double" in hive and sync it to Kylin, the same SQL can run successfully;