[ https://issues.apache.org/jira/browse/CALCITE-4379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Josh Elser reassigned CALCITE-4379: ----------------------------------- Assignee: Dmitri Bourlatchkov > Meta.Frame created with java float values in rows hits a ClassCastException > in toProto() > ---------------------------------------------------------------------------------------- > > Key: CALCITE-4379 > URL: https://issues.apache.org/jira/browse/CALCITE-4379 > Project: Calcite > Issue Type: Bug > Components: avatica > Affects Versions: 1.17.0 > Reporter: Dmitri Bourlatchkov > Assignee: Dmitri Bourlatchkov > Priority: Major > Labels: pull-request-available > Time Spent: 20m > Remaining Estimate: 0h > > Use case: > * Custom {{Meta}} implementation > * {{Meta.Frame.create(offset, done, rows)}} is called with a row (a {{List}}) > containing a java {{Float}} value > ** Note: the float value is fetched from Apache Cassandra, which has 32-bit > float types (unlike SQL). > ** Related [email > discussion|https://mail-archives.apache.org/mod_mbox/calcite-dev/202011.mbox/%3CCAPSgeEREWLTNpBTpNBe4TY4hvwBWR9x-5BxAckKOTAE5QpoP9Q%40mail.gmail.com%3E] > > * The {{Frame}} is serialized by calling its {{.toProto()}} method > * ClassCastException occurs > Exception snippet: > {noformat} > java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Float > at > org.apache.calcite.avatica.remote.TypedValue.writeToProtoWithType(TypedValue.java:600) > at org.apache.calcite.avatica.remote.TypedValue.toProto(TypedValue.java:805) > at org.apache.calcite.avatica.Meta$Frame.serializeScalar(Meta.java:991) > at org.apache.calcite.avatica.Meta$Frame.parseColumn(Meta.java:977) > at org.apache.calcite.avatica.Meta$Frame.toProto(Meta.java:942) > at > org.apache.calcite.avatica.remote.Service$FetchResponse.serialize(Service.java:1468) > [...snip...] > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)