drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Challapalli (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-3299) Hive: hex function from hive returning non-printable characters
Date Tue, 16 Jun 2015 01:59:00 GMT
Rahul Challapalli created DRILL-3299:
----------------------------------------

             Summary: Hive: hex function from hive returning non-printable characters
                 Key: DRILL-3299
                 URL: https://issues.apache.org/jira/browse/DRILL-3299
             Project: Apache Drill
          Issue Type: Bug
          Components: Functions - Hive
            Reporter: Rahul Challapalli
            Assignee: Mehant Baid


git.commit.id.abbrev=48449fe

The below query returns the data properly from sqlline. 
{code}
select hex(l_suppkey) from hive.tpch01_parquet_nodate.lineitem;
{code}

However when I use the below code to read it using JDBC, I am getting un-printable characters
{code}
resultSet = statement.executeQuery(query);
String str = new String(resultSet.getBytes(i));
{code}

When I create the string with UTF-16 encoding, things work fine
{code}
String str = new String(resultSet.getBytes(i), java.nio.charset.Charset.forName("UTF-16"))
{code}

Most likely there could be nothing wrong with drill and the clients could be resposible for
inspecting the types and reading the data accordingly.

Just wanted to raise this JIRA to verify whether the current behavior is expected or not.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message