[ 
https://issues.apache.org/jira/browse/IMPALA-1370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17949830#comment-17949830
 ] 

ASF subversion and git services commented on IMPALA-1370:
---------------------------------------------------------

Commit cb496104d98e8cbd87acf25277f2648cffaac42a in impala's branch 
refs/heads/master from Riza Suminto
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=cb496104d ]

IMPALA-14027: Implement HS2 NULL_TYPE using TStringValue

HS2 NULL_TYPE should be implemented using TStringValue.

However, due to incompatibility with Hive JDBC driver implementation
then, Impala choose to implement NULL type using TBoolValue (see
IMPALA-914, IMPALA-1370).

HIVE-4172 might be the root cause for such decision. Today, the Hive
JDBC (org.apache.hive.jdbc.HiveDriver) does not have that issue anymore,
as shown in this reproduction after applying this patch:

./bin/run-jdbc-client.sh -q "select null" -t NOSASL
Using JDBC Driver Name: org.apache.hive.jdbc.HiveDriver
Connecting to: jdbc:hive2://localhost:21050/;auth=noSasl
Executing: select null
----[START]----
NULL
----[END]----
Returned 1 row(s) in 0.343s

Thus, we can reimplement NULL_TYPE using TStringValue to match
HiveServer2 behavior.

Testing:
- Pass core tests.

Change-Id: I354110164b360013d9893f1eb4398c3418f80472
Reviewed-on: http://gerrit.cloudera.org:8080/22852
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> "SELECT null" returns result in stringVal in HS2 protocol V6
> ------------------------------------------------------------
>
>                 Key: IMPALA-1370
>                 URL: https://issues.apache.org/jira/browse/IMPALA-1370
>             Project: IMPALA
>          Issue Type: Bug
>    Affects Versions: Impala 2.0
>            Reporter: Uri Laserson
>            Assignee: Henry Robinson
>            Priority: Minor
>
> If you execute {{SELECT null}} using HS2 protocol V6, then calling 
> {{TGetResultSetMetadataReq}} describes the resulting column as boolean, but 
> the {{TColumn}} object I get back puts the data in {{stringVal}}:
> {code}
> [TColumn(i32Val=None, byteVal=None, i16Val=None, i64Val=None, 
> stringVal=TStringColumn(nulls='\x01', values=['']), boolVal=None, 
> doubleVal=None, binaryVal=None)]
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to