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)