查询Hive结果中的汉字none
Querying Chinese characters in Hive results none
问题:
我有一个配置单元 table,它由 1 个包含中文字符的特定列组成。例如 维 诶 吾
并且当我尝试 运行 以下查询时,它不会 return 一行。
Select * from db1 where col4 rlike "吾";
详情:
也只是为了检查,我也尝试过使用 SERDEPROPERTIES("serialization.encoding"='UTF-8');
更改 table 属性,但没有任何运气。
我还尝试使用以下查询,其中 U+543E 表示 吾
的 unicode 值:
Select * from db1 where col4 rlike "U+543E";
上述查询是否需要转义序列,或者是否存在潜在的编码问题?
运行 以下对我有用:
Select * from db1 where long_text_field_2 rlike "\u8FCE";
问题:
我有一个配置单元 table,它由 1 个包含中文字符的特定列组成。例如 维 诶 吾
并且当我尝试 运行 以下查询时,它不会 return 一行。
Select * from db1 where col4 rlike "吾";
详情:
也只是为了检查,我也尝试过使用 SERDEPROPERTIES("serialization.encoding"='UTF-8');
更改 table 属性,但没有任何运气。
我还尝试使用以下查询,其中 U+543E 表示 吾
的 unicode 值:
Select * from db1 where col4 rlike "U+543E";
上述查询是否需要转义序列,或者是否存在潜在的编码问题?
运行 以下对我有用:
Select * from db1 where long_text_field_2 rlike "\u8FCE";