My Hive(版本0.14.0.2.2.6.4-1)表table_test
采用ORC
格式,包含一些数据,我需要重新构建该表
我使用
采用了备份表(ORC
格式)
create table table_test_bk as select * from table_test;
将原始表格删除为:
drop table table_test;
运行修改后的DDL以重新创建table_test(中间column_new字符串中有一个新列)
旧桌子穿刺:
(col1 string,col2 decimal(10,2),col3 timestamp);
新表格式:
(col1 string,col2 decimal(10,2),column_new string,col3 timestamp);
使用
从备份表恢复数据集insert into table table_test select col1,col2,null as column_new,col3 from table_test_bk;
当第4步成功运行时,请删除备份表
所有这5个步骤都成功运行,但在进行数据健全时我可以看到以下异常,而且我无法获得任何o / p。正在做select count(1) from table_test;
给我正确的数据计数。
异常失败java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException:java.lang.ClassCastException:org.apache.hadoop.hive.serde2.io.HiveDecimalWritable无法强制转换为org .apache.hadoop.io.Text
感谢任何帮助。