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
- links to
Looks like this may be in part to how sqlline works. Calling getString() on a BINARY/VARBINARY field exhibits the above error where getBytes() works as expected.