You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Xin Liu (JIRA)" <ji...@apache.org> on 2017/09/28 06:44:00 UTC

[jira] [Created] (IMPALA-5992) Select view failed if view contains Chinese conditions with metadata stored in MySQL

Xin Liu created IMPALA-5992:
-------------------------------

             Summary: Select view failed if view contains Chinese conditions with metadata stored in MySQL
                 Key: IMPALA-5992
                 URL: https://issues.apache.org/jira/browse/IMPALA-5992
             Project: IMPALA
          Issue Type: Bug
          Components: Catalog, Frontend
    Affects Versions: Impala 2.5.0
            Reporter: Xin Liu


Example:
create view v1 as select * from tb where y ='中国';
select * from v1;  failed

Reason:
the definition of view stored in two columns in MySQL:
VIEW_EXPANDED_TEXT and VIEW_ORIGINAL_TEXT
catalog bring this when execute the select statement: 
SELECT * FROM default.tb WHERE y = '??'
because the default character set of MySQL is Latin1,it does not support Chinese.

Solutions:
1、transform to utf-8 when catalogd bring VIEW_EXPANDED_TEXT and VIEW_ORIGINAL_TEXT from MySQL
didn't work because data is corrupted when write into MySQL.
2、like Hive,store definition text using CTE.But it lost when restart Hive,it's only a temporary measure.
3、change the default character set to utf-8, it worked but sometimes it could be hard in a big System.

Questions:
Is there any other solution to solve this problem?Or something to avoid the character set issue?
Maybe store metadata in HBase like Hive?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)