Hive 遭遇;无法更改表时出错。”;在配置单元中更改表列位置时

Hive 遭遇;无法更改表时出错。”;在配置单元中更改表列位置时,hive,hiveql,Hive,Hiveql,我有一个简单的表格虚构电影: hive>describe fiction_movie; OK title string actors array<string> genre string rating int 4 rows selected (0.03 seconds) 我想做的是重新安排专栏位置,并将标题放在流派之后: #I tried hive>alter table fiction_movie change column title title string af

我有一个简单的表格
虚构电影

hive>describe fiction_movie;
OK
title string
actors array<string>
genre string
rating int
4 rows selected (0.03 seconds)
我想做的是重新安排专栏位置,并将标题放在流派之后:

#I tried
hive>alter table fiction_movie change column title title string after genre;
但它给了我以下错误:

错误:处理语句时出错:失败:执行错误,从org.apache.hadoop.hive.ql.exec.ddlstask返回代码1。无法更改表。以下列的类型与其各自位置的现有列不兼容:
演员,类型(状态=08S01,代码=1)


有人知道为什么吗?谢谢大家!

这段代码在我的机器上运行得很好

hive> create table fiction_movie(
    > title string,
    > actors array<string>,
    > genre string,
    > rating int);
OK
Time taken: 0.155 seconds
hive> alter table fiction_movie change column title title string after genre;
OK
Time taken: 0.4 seconds
hive> describe  fiction_movie;
OK
actors                  array<string>
genre                   string
title                   string
rating                  int
Time taken: 0.37 seconds, Fetched: 4 row(s)

然后更改您的表。

是“
设置hive.metastore.disallow.invalid.col.type.changes=true“正确的配置设置?”?。在配置单元[wiki |中,我只看到“hive.metastore.disallow.compatible.col.type.changes”。请更正它。
hive> create table fiction_movie(
    > title string,
    > actors array<string>,
    > genre string,
    > rating int);
OK
Time taken: 0.155 seconds
hive> alter table fiction_movie change column title title string after genre;
OK
Time taken: 0.4 seconds
hive> describe  fiction_movie;
OK
actors                  array<string>
genre                   string
title                   string
rating                  int
Time taken: 0.37 seconds, Fetched: 4 row(s)
`SET hive.metastore.disallow.invalid.col.type.changes=true;`