-
Type:
Bug
-
Status: Resolved
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: Impala 2.0, Impala 2.0.1, Impala 2.1, Impala 2.1.1
-
Fix Version/s: Impala 2.2
-
Component/s: None
-
Labels:None
The type metadata is not properly populated for VARCHAR when calling the Hiveserver2 GetResultSetMetadata() RPC.
From JDBC/ODBC this issue manifests itself as incorrectly reporting the max size for VARCHAR columns as 32767.
This small program demonstrates the problem:
public class Hs2VarcharTest { public static void main(String[] args) throws TException { TTransport trans = new TSocket("localhost", 21050); trans.open(); TProtocol prot = new TBinaryProtocol(trans); Client c = new Client(prot); TOpenSessionReq openSessReq = new TOpenSessionReq(); TOpenSessionResp openSessionResp = c.OpenSession(openSessReq); TExecuteStatementReq execStmtReq = new TExecuteStatementReq( openSessionResp.getSessionHandle(), "select * from (values(cast('a' as varchar(10)))) v"); TExecuteStatementResp execStmtResp = c.ExecuteStatement(execStmtReq); TGetResultSetMetadataReq metaReq = new TGetResultSetMetadataReq(execStmtResp.getOperationHandle()); TGetResultSetMetadataResp metaResp = c.GetResultSetMetadata(metaReq); TTypeDesc typeDesc = metaResp.getSchema().getColumns().get(0).getTypeDesc(); TTypeQualifiers typeQuals = typeDesc.getTypes().get(0).getPrimitiveEntry().getTypeQualifiers(); System.out.println(typeQuals); <-- prints null } }
- is duplicated by
-
IMPALA-1759 Impala Thrift returns STRING not varchar when using OVER() clause
-
- Resolved
-