Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-1972

!describe throws exception when used with sqlline-thin/pqs

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.4.0
    • None
    • None
    • None

    Description

      Seems we're dropping some metadata about column types.

      0: jdbc:phoenix:thin:url=http://localhost:876> !describe TABLE1
      +------------------------------------------+-----------------------------------+
      |                TABLE_CAT                 |               TABLE_SCHEM         |
      +------------------------------------------+-----------------------------------+
      java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
      	at org.apache.calcite.avatica.util.AbstractCursor$LongAccessor.getLong(AbstractCursor.java:497)
      	at org.apache.calcite.avatica.AvaticaParameter.get(AvaticaParameter.java:320)
      	at org.apache.calcite.avatica.AvaticaResultSet.getObject(AvaticaResultSet.java:380)
      	at sqlline.Rows$Row.<init>(Rows.java:157)
      	at sqlline.IncrementalRows.hasNext(IncrementalRows.java:63)
      	at sqlline.TableOutputFormat.print(TableOutputFormat.java:33)
      	at sqlline.SqlLine.print(SqlLine.java:1653)
      	at sqlline.Commands.metadata(Commands.java:199)
      	at sqlline.Commands.columns(Commands.java:360)
      	at sqlline.Commands.describe(Commands.java:1367)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
      	at sqlline.SqlLine.dispatch(SqlLine.java:804)
      	at sqlline.SqlLine.begin(SqlLine.java:681)
      	at sqlline.SqlLine.start(SqlLine.java:398)
      	at sqlline.SqlLine.main(SqlLine.java:292)
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            elserj Josh Elser
            ndimiduk Nick Dimiduk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment