apache / drill

Apache Drill is a distributed MPP query layer for self describing data
https://drill.apache.org/
Apache License 2.0
1.92k stars 985 forks source link

Querying Chinese Characters in Apache Drill #2890

Open 1239068511 opened 3 months ago

1239068511 commented 3 months ago

Dear Apache Drill Community,

I've encountered an issue when querying Chinese characters in Apache Drill. It seems that whenever I execute a query containing Chinese characters, they are automatically converted to Unicode. For example, when I execute the query:

go

SELECT name FROM `mysql`.`demo`.`表a` WHERE name = '张三'

The result returns:

go

SELECT `name` FROM `demo`.`表a` WHERE `name` = u&'\5f20\4e09'

Instead of returning the expected Chinese characters, they are represented as Unicode escape sequences.

I've tried adjusting the character set settings in Apache Drill's configuration files and JDBC connection strings, but the issue persists. Is there a specific configuration or workaround to prevent Apache Drill from automatically converting Chinese characters to Unicode?

Any assistance or guidance on resolving this issue would be greatly appreciated.

Thank you

shfshihuafeng commented 3 months ago

i think it caused by calcite .you can rewrite quoteStringLiteral method