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

Josh Elser commented on CALCITE-921:
------------------------------------

bq. If the underlying data is represented using byte[], why is a StringAccessor 
being created?

Good question. I'll need to look at this again to remind myself what is 
actually happening.

> ClassCastException byte[] to String with protobuf
> -------------------------------------------------
>
>                 Key: CALCITE-921
>                 URL: https://issues.apache.org/jira/browse/CALCITE-921
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica
>            Reporter: Josh Elser
>            Assignee: Josh Elser
>             Fix For: 1.5.0
>
>
> {noformat}
> java.lang.ClassCastException: [B cannot be cast to java.lang.String
>       at 
> org.apache.calcite.avatica.util.AbstractCursor$StringAccessor.getString(AbstractCursor.java:726)
>       at 
> org.apache.calcite.avatica.AvaticaResultSet.getString(AvaticaResultSet.java:233)
>       at sqlline.Rows$Row.<init>(Rows.java:183)
>       at sqlline.IncrementalRows.hasNext(IncrementalRows.java:63)
>       at sqlline.TableOutputFormat.print(TableOutputFormat.java:33)
>       at sqlline.SqlLine.print(SqlLine.java:1653)
>       at sqlline.Commands.execute(Commands.java:833)
>       at sqlline.Commands.sql(Commands.java:732)
>       at sqlline.SqlLine.dispatch(SqlLine.java:808)
>       at sqlline.SqlLine.begin(SqlLine.java:681)
>       at sqlline.SqlLine.start(SqlLine.java:398)
>       at sqlline.SqlLine.main(SqlLine.java:292)
> {noformat}
> JSON encoding doesn't have this issue. The StringAccessor (actually a 
> BinaryFromStringAccessor) expects to get back a String as the object but it 
> gets a byte[].



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

Reply via email to