hive rename table name

hive rename tablename

hive rename的时候,如果table不是外部表,那么table的location会进行修改。

                                   如果table是外部表,那么location不变。

HiveAlterHandler

      // if this alter is a rename, and user didn't change the

      // default location (or new location is empty), and table is

      // not an external table, that means user is asking metastore

      // to move data to new location corresponding to the new name

猜你喜欢

转载自bupt04406.iteye.com/blog/1943672
今日推荐