[
https://issues.apache.org/jira/browse/HIVE-14156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15361394#comment-15361394
]
Bing Li commented on HIVE-14156:
--------------------------------
I noticed that in the schema files under metastore/scripts/upgrade/mysql, like
hive-schema-2.0.0.mysql.sql, the character set is latin1 for all tables instead
of utf8.
And it could work with MySQL if I update the following columns in the schema
script to utf8
SDS.LOCATION
PARTITIONS.PART_NAME
PARTITION_KEY_VALS.PART_KEY_VAL
1) change the limitation of varchar(xxx) to varchar(255)
2) change "latin1" to "utf8"
In Hive's wiki and HIVE-8550, it mentioned that Hive could support unicode in
the partition name.
Is there some special settings for MySQL to support it?
> Problem with Chinese characters as partition value when using MySQL
> -------------------------------------------------------------------
>
> Key: HIVE-14156
> URL: https://issues.apache.org/jira/browse/HIVE-14156
> Project: Hive
> Issue Type: Bug
> Components: Metastore
> Affects Versions: 1.2.1, 2.0.0
> Reporter: Bing Li
> Assignee: Bing Li
>
> Steps to reproduce:
> create table t1 (name string, age int) partitioned by (city string) row
> format delimited fields terminated by ',';
> load data local inpath '/tmp/chn-partition.txt' overwrite into table t1
> partition (city='北京');
> The content of /tmp/chn-partition.txt:
> 小明,20
> 小红,15
> 张三,36
> 李四,50
> When check the partition value in MySQL, it shows ?? instead of "北京".
> When run "drop table t1", it will hang.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)