本文介绍了有没有办法改变配置单元表中的列类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当前模式是:
The current schema is:
hive> describe tableA;
OK
id int
ts timestamp
我想改变 ts
列为 BIGINT
,但不丢弃表并重新创建。是否有可能?
I want to change ts
column to be BIGINT
without dropping table and recreate again. Is it possible?
推荐答案
找到解决方案:
Found the solution:
ALTER TABLE tableA CHANGE ts ts BIGINT AFTER id;
有关完整的详细信息,请参阅:
See this for complete details: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterColumn
这篇关于有没有办法改变配置单元表中的列类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!