【发布时间】:2022-01-15 03:26:04
【问题描述】:
我正在尝试将 HIVE 外部表上的几列从双精度更改为十进制。我已删除、重新创建表并运行 msck repair 语句。但是,我无法从 Hive 或 Impala 中选择表,因为它返回以下错误:
Hive: ERROR processing query/statement. Error Code: 0, SQL state: File 'hdfs://ns-bigdata/user/warehouse/fact/TEST_FACT/key=2458773/000000_0' has an incompatible Parquet schema for column 'testing.fact_table.tot_amt'. Column type: DECIMAL(28,7), Parquet schema:
optional double tot_amt [i:29 d:1 r:0]
Impala: ERROR processing query/statement. Error Code: 0, SQL state: File 'hdfs://ns-bigdata/user/warehouse/fact/TEST_FACT/key=2458773/000000_0' has an incompatible Parquet schema for column 'testing.fact_table.tot_amt'. Column type: DECIMAL(28,7), Parquet schema:
optional double tot_amt [i:29 d:1 r:0]
是否可以将数据类型从双精度更改为十进制? 另外删除+重新创建表和更改表有什么区别?
【问题讨论】:
标签: database hive bigdata impala