hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xuefu Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-6687) JDBC ResultSet fails to get value by qualified projection name
Date Tue, 18 Mar 2014 17:49:56 GMT

     [ https://issues.apache.org/jira/browse/HIVE-6687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Xuefu Zhang updated HIVE-6687:
------------------------------

    Description: 
Getting value from result set using fully qualified name would throw exception. Only solution
today is to use position of the column as opposed to column label.
{code}
String sql = "select r1.x, r2.x from r1 join r2 on r1.y=r2.y";
ResultSet res = stmt.executeQuery(sql);
res.getInt("r1.x");
{code}
res.getInt("r1.x"); would throw exception unknown column even though sql specifies it.

Fix is to fix resultsetschema in semantic analyzer.



  was:
Getting value from result set using fully qualified name would throw exception. Only solution
today is to use position of the column as opposed to column label.

String sql = "select r1.x, r2.x from r1 join r2 on r1.y=r2.y";
ResultSet res = stmt.executeQuery(sql);
res.getInt("r1.x");

res.getInt("r1.x"); would throw exception unknown column even though sql specifies it.

Fix is to fix resultsetschema in semantic analyzer.




> JDBC ResultSet fails to get value by qualified projection name
> --------------------------------------------------------------
>
>                 Key: HIVE-6687
>                 URL: https://issues.apache.org/jira/browse/HIVE-6687
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>    Affects Versions: 0.12.0
>            Reporter: Laljo John Pullokkaran
>            Assignee: Laljo John Pullokkaran
>             Fix For: 0.12.1
>
>
> Getting value from result set using fully qualified name would throw exception. Only
solution today is to use position of the column as opposed to column label.
> {code}
> String sql = "select r1.x, r2.x from r1 join r2 on r1.y=r2.y";
> ResultSet res = stmt.executeQuery(sql);
> res.getInt("r1.x");
> {code}
> res.getInt("r1.x"); would throw exception unknown column even though sql specifies it.
> Fix is to fix resultsetschema in semantic analyzer.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message