Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

!indexes command fails because of Hive bug #203

Closed
snuyanzin opened this issue Nov 15, 2018 · 3 comments
Closed

!indexes command fails because of Hive bug #203

snuyanzin opened this issue Nov 15, 2018 · 3 comments

Comments

@snuyanzin
Copy link
Collaborator

snuyanzin commented Nov 15, 2018

It looks like there is an Apache Hive bug which blocks output of !indexes command. The trace is below.
The suggestion is to use current value as default if java.sql.ResultSetMetaData#getColumnDisplaySize fails for any reason

by the way beeline fails in the same way

0: Apache Hive@default>!indexes                                                                                                  
Error: Unrecognized column type: SHORT (state=,code=0)                                                                                                                                                             
java.sql.SQLException: Unrecognized column type: SHORT                                                                                                                                                             
        at org.apache.hive.jdbc.JdbcColumn.typeStringToHiveType(JdbcColumn.java:164)                                                                                                                               
        at org.apache.hive.jdbc.HiveResultSetMetaData.getHiveType(HiveResultSetMetaData.java:48)                                                                                                                   
        at org.apache.hive.jdbc.HiveResultSetMetaData.getColumnDisplaySize(HiveResultSetMetaData.java:61)                                                                                                          
        at sqlline.IncrementalRows.<init>(IncrementalRows.java:47)                                                                                                                                                 
        at sqlline.SqlLine.print(SqlLine.java:1702)                                                                                                                                                                
        at sqlline.Commands.metadata(Commands.java:207)                                                                                                                                                            
        at sqlline.Commands.indexes(Commands.java:364)                                                                                                                                                             
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                                                                             
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)                                                                                                                           
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                                                                                   
        at java.lang.reflect.Method.invoke(Method.java:498)                                                                                                                                                        
        at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:38)                                                                                                                              
        at sqlline.SqlLine.dispatch(SqlLine.java:718)                                                                                                                                                              
        at sqlline.SqlLine.begin(SqlLine.java:539)                                                                                                                                                                 
        at sqlline.SqlLine.start(SqlLine.java:264)                                                                                                                                                                 
        at sqlline.SqlLine.main(SqlLine.java:195)                                                                                                                                                                  
@julianhyde
Copy link
Owner

@julianhyde
Copy link
Owner

Fixed in 29f03f8, PR #204. Thanks @snuyanzin!

@julianhyde
Copy link
Owner

I force-pushed 60eb2f3, to fix #207 and PR #208.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants