0

尝试更改 hive 中的 cloumn 类型,运行 DDL,但抛出错误

运行以下 DDL:

ALTER TABLE INV.HTL_RATE_PLAN
CHANGE RATE_PLAN_RSTRCT_STRT_DT RATE_PLAN_RSTRCT_STRT_DT DATE 
COMMENT 'Advance booking alternate days restriction rule applied to a rate category. This rule dictates the minimum number of days before arrival the guest must book for the rate category to be available.'
AFTER PRICE_GRID_CD;

错误:

Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Reordering columns is not supported for table INV_TRF.HTL_RATE_PLAN. SerDe may be incompatible.

帮助?我究竟做错了什么。请建议。

4

1 回答 1

1

要更改列类型,您只需要这样做:

ALTER TABLE INV.HTL_RATE_PLAN
CHANGE RATE_PLAN_RSTRCT_STRT_DT RATE_PLAN_RSTRCT_STRT_DT DATE 
COMMENT 'Advance booking alternate days restriction rule applied to a rate category. This rule dictates the minimum number of days before arrival the guest must book for the rate category to be available.';

删除的部分AFTER PRICE_GRID_CD将列位置更改为指定列之后,但您的由 serde 处理的存储类型不支持此操作。

于 2017-01-13T16:24:26.237 回答