hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chaoyu Tang" <>
Subject Re: Review Request 28403: HIVE-8889:JDBC Driver ResultSet.getXXXXXX(String columnLabel) methods Broken
Date Mon, 24 Nov 2014 22:44:44 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Nov. 24, 2014, 10:44 p.m.)

Review request for hive, Ashutosh Chauhan, Prasad Mujumdar, and Szehon Ho.


Revised based on Brock's review comments

Repository: hive-git


For JDBC application using query like select * , the columnLabel in ResultSet.getXXX(String
columnLabel) has to be a full-qualified name (e.g. tableName.colName) unless you set the hive.resultset.use.unique.column.names
to false, but this setting will break other cases which require the qualified name (see HIVE-6687).

I think Hive JDBC should not flip the support only to shortname or qualified name in getXXX(columnName)
depending on a property, instead it should support both at same time like that in MySQL. For
example, for queries to a table or view like following:
a)select * from src
b)select key from src
c)select * from srcview
d)select key from srcview
getXXX(key) and getXXX(src.key) (or getXXX(srcview.key)) should all work.

The changes in this patch include:
1. findColumn in HiveBaseResultSet will find a column either by short name or qualified name
2. HS2 always returns the qualified column name if possible, so remove the property hive.resultset.use.unique.column.names
3. Unit tests

Diffs (updated)

  common/src/java/org/apache/hadoop/hive/conf/ fafd78e63e9b41c9fdb0e017b567dc719d151784

  itests/hive-unit/src/test/java/org/apache/hive/jdbc/ f2560e2e4793cca11950519708b1a666eb700e50

  jdbc/src/java/org/apache/hive/jdbc/ 8cbf9e7092489a2adb0bc2ba6b5ee38e41c041f8

  ql/src/java/org/apache/hadoop/hive/ql/parse/ 1953e81e52bd7ada7b7ec750205a8e33edfcd9ae



1. New test cases in passed
2. pre-committed tests were submitted


Chaoyu Tang

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message