这个代码在我的机器上运行得很好。
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;`
也不会改变你的桌子。