-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28403/#review62871
-----------------------------------------------------------



itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
<https://reviews.apache.org/r/28403/#comment104984>

    trim trailing ws



jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java
<https://reviews.apache.org/r/28403/#comment104985>

    Can we add a message here like:
    
    "Could not find " + columnName + " in " + normalizedColumnNames


- Brock Noland


On Nov. 24, 2014, 9:12 p.m., Chaoyu Tang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28403/
> -----------------------------------------------------------
> 
> (Updated Nov. 24, 2014, 9:12 p.m.)
> 
> 
> Review request for hive, Ashutosh Chauhan, Prasad Mujumdar, and Szehon Ho.
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> 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
> -----
> 
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 
> fafd78e63e9b41c9fdb0e017b567dc719d151784 
>   itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 
> f2560e2e4793cca11950519708b1a666eb700e50 
>   jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java 
> 8cbf9e7092489a2adb0bc2ba6b5ee38e41c041f8 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 
> 1953e81e52bd7ada7b7ec750205a8e33edfcd9ae 
> 
> Diff: https://reviews.apache.org/r/28403/diff/
> 
> 
> Testing
> -------
> 
> 1. New test cases in TestJdbcDriver2.java passed
> 2. pre-committed tests were submitted
> 
> 
> Thanks,
> 
> Chaoyu Tang
> 
>

Reply via email to