我分享了在分区的配置单元表上添加列的经验。 正如您所看到的,尽管有CASCADE功能,但ALTER仍在制动我的桌子:(
CREATE TABLE test (
a string,
b string,
c string
)
PARTITIONED BY (
x string,
y string,
z string
)
ROW FORMAT SERDE
'org.apache.hadoop.hive.ql.io.orc.OrcSerde'
STORED AS INPUTFORMAT
'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
TBLPROPERTIES (
'orc.compress'='SNAPPY'
);
CREATE TABLE test_tmp...
hadoop distcp hdfs://.../test/* dfs://.../test_tmp
MSCK REPAIR TABLE test_tmp;
SELECT * FROM test_tmp
LIMIT 100
检查:好的(我得到了结果)
ALTER TABLE test_tmp
ADD COLUMNS(
aa timestamp,
bb string,
cc int,
dd string
) CASCADE;
SELECT * FROM test_tmp
LIMIT 100
...
]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:19, Vertex vertex_1502459312997_187854_4_00 [Map 1] killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
... 1 statement(s) executed, 0 rows affected, exec/fetch time: 21.655/0.000 sec [0 successful, 1 errors]
检查:KO(我收到此错误)
答案 0 :(得分:0)
如果您使用的是Hive 0.x或1.x,那么您可能是...的受害者
HIVE-10598当列添加到表格时,矢量化borks。
...特定于ORC格式,即使从JIRA标签中看不出来也是如此。
Hive 2.0 有部分修复(即ADD
已修复,但DROP
/ RENAME
/ CHANGE
仍然瘫痪)感谢
HIVE-11981 ORC架构演变问题(矢量化,ACID和 非矢量化)
另一个与CHANGE
HIVE-14355 llap中ORC的模式演变被打破 用于Int到String的转换
继续......