You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by 王贤良 <se...@live.cn> on 2015/05/20 12:30:06 UTC

character set support && hive 1.1.0(or 1.2.0) support

hello:
    for a hive table, the query is:
    select * from dim_province where province_name ='北京';
    SYSTEM ERROR: org.apache.calcite.runtime.CalciteException: Failed to encode '北京' in character set 'ISO-8859-1'
    how to set utf-8?
 
    for hive 1.1.0( or 1.2.0), a pqrauet table ,the column's type is varchar( or timestamp), the error is :
    SYSTEM ERROR: java.lang.UnsupportedOperationException: Parquet does not support varchar. See HIVE-6384
    how to support?

Thanks

Re: character set support && hive 1.1.0(or 1.2.0) support

Posted by Hao Zhu <hz...@maprtech.com>.
1.

0: jdbc:drill:zk=h2.poc.com:5181,h3.poc.com:5> select * from `chinese.csv`;
+---------------------+
|       columns       |
+---------------------+
| ["北京","1","2","3"]  |
+---------------------+
1 row selected (0.093 seconds)

0: jdbc:drill:zk=h2.poc.com:5181,h3.poc.com:5> select columns[2] from
`chinese.csv` where columns[0]= _UTF16'北京';
+---------+
| EXPR$0  |
+---------+
| 2       |
+---------+
1 row selected (0.115 seconds)

*I would suggest put above in documentation.*

2.

Drill 1.0 supports hive 0.13 storage plugin.
http://drill.apache.org/docs/hive-storage-plugin/
Hive 1.x should be in future roadmap.

Thanks,
Hao


On Wed, May 20, 2015 at 3:30 AM, 王贤良 <se...@live.cn> wrote:

> hello:
>     for a hive table, the query is:
>     select * from dim_province where province_name ='北京';
>     SYSTEM ERROR: org.apache.calcite.runtime.CalciteException: Failed to
> encode '北京' in character set 'ISO-8859-1'
>     how to set utf-8?
>
>     for hive 1.1.0( or 1.2.0), a pqrauet table ,the column's type is
> varchar( or timestamp), the error is :
>     SYSTEM ERROR: java.lang.UnsupportedOperationException: Parquet does
> not support varchar. See HIVE-6384
>     how to support?
>
> Thanks
>