Search code examples
impala

Can Impala create a table with Chinese column names?


I try to create a table which has Chinese column names in Impala-Shell, but It seems Impala doesn't accept such DDL.

the sql is something like this:

create table aa(`编号` string);

And Impala-shell will complain that 编号 is a invalid column name.

I also tied to use double quote or single quote, and didn't work neither.

But Spark SQL and Hive SQL accept this DDL...

So did I do something wrong, or Impala just work this way?

P.S. I am using Impala CHD 5.8.0


Solution

  • No.
    The documentation is very clear about it.

    • An identifier must start with an alphabetic character. The remainder can contain any combination of alphanumeric characters and underscores. Quoting the identifier with backticks has no effect on the allowed characters in the name.
    • An identifier can contain only ASCII characters.

    https://www.cloudera.com/documentation/enterprise/5-8-x/topics/impala_identifiers.html#identifiers