hive中删除列时没有与mysql语句alter table <table> drop column <col>对应的语句。

然而依然可以完成此功能:使用ALTER TABLE log_messages REPLACE COLUMNS (<new column descriptions>),具体语法请参见《Programing Hive》中“Deleting or Replacing Columns”小节。注:分区列不能出现在<new column descriptions>中,在hive v0.7.1中是这样,其他版本不详。

posted on 2013-12-27 17:54  山君  阅读(7364)  评论(0编辑  收藏  举报