Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-921

ClassCastException byte[] to String with protobuf

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.0
    • Component/s: avatica
    • Labels:
      None

      Description

      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)
      

      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[].

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                elserj Josh Elser
                Reporter:
                elserj Josh Elser
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: