[ https://issues.apache.org/jira/browse/HIVE-4252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13619141#comment-13619141 ]
Thejas M Nair commented on HIVE-4252: ------------------------------------- Table B-6 "Use of ResultSet getter Methods to Retrieve JDBC Data Types" in jdbc 3(&4) spec shows what datatypes support getString(), and Array and Struct are not one of those. Ie, we have leeway here. There is also not much pattern to be followed here, as we don't have many databases supporting these types (eq mysql and sql server don't). I think having json strings is useful for being able to parse the strings back to types. btw, the current jdbc driver implementation returns strings for the complex types, if you do a ResultSetMetadata.getColumnType(int) on column that is actually of hive map/struct/array type, it returns the String type . Ideally, we should add support for returning real array and struct types. I am not sure how map type should be handled, maybe json string would remain the workaround. > hiveserver2 string representation of complex types are inconsistent with cli > ---------------------------------------------------------------------------- > > Key: HIVE-4252 > URL: https://issues.apache.org/jira/browse/HIVE-4252 > Project: Hive > Issue Type: Bug > Components: HiveServer2 > Affects Versions: 0.11.0 > Reporter: Thejas M Nair > Assignee: Thejas M Nair > Attachments: HIVE-4252.1.patch, HIVE-4252.2.patch > > > For example, it prints struct as "[null, null, null]" instead of > "{\"r\":null,\"s\":null,\"t\":null}" > And for maps it is printing it as "{k=v}" instead of {\"k\":\"v\"} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira