[ https://issues.apache.org/jira/browse/CALCITE-4108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roman Churganov updated CALCITE-4108: ------------------------------------- Description: running a query like : {{select tp.o, MAX( tp.n )}} {{ from tp join o on tp.o = o.k}} {{ group by tp.o}} type of tp.n in Schema is FLOAT, value of tp.n returned from table is of type java.lang.Float, Calcite makes grouping internally and get error {{java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.Doublejava.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.Double at Baz$1.apply(Unknown Source) at Baz$1.apply(Unknown Source) at Baz$1.apply(Unknown Source) at org.apache.calcite.adapter.enumerable.SequencedAdderAggregateLambdaFactory$AccumulatorAdderSeq.apply(SequencedAdderAggregateLambdaFactory.java:81) at org.apache.calcite.linq4j.EnumerableDefaults.groupBy_(EnumerableDefaults.java:806) at org.apache.calcite.linq4j.EnumerableDefaults.groupBy(EnumerableDefaults.java:739) at org.apache.calcite.linq4j.DefaultEnumerable.groupBy(DefaultEnumerable.java:299) at Baz.bind(Unknown Source)}} was: running a query like : {{{{select tp.o, MAX( tp.n )}}}} {{ {{ from tp join o on tp.o = o.k}}}} {{ {{ group by tp.o}}}} {{type of }}tp.n in Schema is FLOAT, value of tp.n returned from table is of type java.lang.Float, Calcite makes grouping internally and get error {{java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.Doublejava.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.Double at Baz$1.apply(Unknown Source) at Baz$1.apply(Unknown Source) at Baz$1.apply(Unknown Source) at org.apache.calcite.adapter.enumerable.SequencedAdderAggregateLambdaFactory$AccumulatorAdderSeq.apply(SequencedAdderAggregateLambdaFactory.java:81) at org.apache.calcite.linq4j.EnumerableDefaults.groupBy_(EnumerableDefaults.java:806) at org.apache.calcite.linq4j.EnumerableDefaults.groupBy(EnumerableDefaults.java:739) at org.apache.calcite.linq4j.DefaultEnumerable.groupBy(DefaultEnumerable.java:299) at Baz.bind(Unknown Source)}} > ClassCastException: java.lang.Float cannot be cast to java.lang.Double > ---------------------------------------------------------------------- > > Key: CALCITE-4108 > URL: https://issues.apache.org/jira/browse/CALCITE-4108 > Project: Calcite > Issue Type: Bug > Components: core > Affects Versions: 1.23.0 > Environment: JDK 1.8 > Reporter: Roman Churganov > Priority: Critical > > running a query like : > {{select tp.o, MAX( tp.n )}} > {{ from tp join o on tp.o = o.k}} > {{ group by tp.o}} > type of tp.n in Schema is FLOAT, value of tp.n returned from table is of type > java.lang.Float, Calcite makes grouping internally and get error > > {{java.lang.ClassCastException: java.lang.Float cannot be cast to > java.lang.Doublejava.lang.ClassCastException: java.lang.Float cannot be cast > to java.lang.Double at Baz$1.apply(Unknown Source) at Baz$1.apply(Unknown > Source) at Baz$1.apply(Unknown Source) at > org.apache.calcite.adapter.enumerable.SequencedAdderAggregateLambdaFactory$AccumulatorAdderSeq.apply(SequencedAdderAggregateLambdaFactory.java:81) > at > org.apache.calcite.linq4j.EnumerableDefaults.groupBy_(EnumerableDefaults.java:806) > at > org.apache.calcite.linq4j.EnumerableDefaults.groupBy(EnumerableDefaults.java:739) > at > org.apache.calcite.linq4j.DefaultEnumerable.groupBy(DefaultEnumerable.java:299) > at Baz.bind(Unknown Source)}} > > > > -- This message was sent by Atlassian Jira (v8.3.4#803005)