Is there a way to alter column type in hive table?

前端 未结 3 789
梦毁少年i
梦毁少年i 2020-12-24 06:15

The current schema is:

hive> describe tableA;
OK
id      int
ts      timestamp

I want to change ts column to be BIGIN

3条回答
  •  不思量自难忘°
    2020-12-24 06:49

    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

提交回复
热议问题