hive版本 0.14

desc table_name 或 desc formatted table_name时,comment如果是中文,会显示成乱码。

hive desc table_name commet乱码问题解决 

两种解决办法

1)修改hive源码,重新编译,替换hive-exec-0.14.jar

2)修改Hive MySQL表中,对应的hive table comment 的字段的类型

 

修改Hive MySQL 元信息表中comment field的编码类型为UTF-8

alter table COLUMNS_V2 modify column comment varchar(256) character set utf8;

COLUMNS_V2 表保存hive表的每一个字段的信息

hive desc table_name commet乱码问题解决

CD_ID: 每次创建表,都会给表分配一个唯一的ID

COMMENT : 字段的注释

COLUMN_NAME: hive table 字段的名称

TYPE_NAME: hive table field的类型

INTEGER_IDX:字段顺序

 

修改hive源码,用UTF-8编码

下载hive

https://archive.apache.org/dist/hive/hive-0.14.0/

具体参考

https://issues.apache.org/jira/browse/HIVE-6308

https://my.oschina.net/jackieyeah/blog/742088

相关文章:

  • 2021-11-21
  • 2021-10-03
  • 2021-05-23
  • 2021-10-13
  • 2021-08-14
  • 2021-09-07
  • 2021-07-02
猜你喜欢
  • 2021-05-04
  • 2021-07-25
  • 2021-11-09
  • 2022-02-15
  • 2022-12-23
  • 2021-06-22
相关资源
相似解决方案