[ 
https://issues.apache.org/jira/browse/CALCITE-4108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17156088#comment-17156088
 ] 

Roman Churganov edited comment on CALCITE-4108 at 7/11/20, 6:15 PM:
--------------------------------------------------------------------

obviously the problem is on our side, we use our own implementation for the 
Schema, and Calcite expects the java.lang.Double type for the FLOAT Schema type


was (Author: rrrrrr111):
obviously that the problem is on our side, we use our own implementation for 
the Schema, and Calcite expects the java.lang.Double type for the FLOAT Schema 
type

> 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
>            Assignee: Feng Zhu
>            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)

Reply via email to