You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Swaranga Sarma (JIRA)" <ji...@apache.org> on 2017/09/14 12:19:00 UTC
[jira] [Updated] (HIVE-17531) Alter Table does not work for nested
columns
[ https://issues.apache.org/jira/browse/HIVE-17531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Swaranga Sarma updated HIVE-17531:
----------------------------------
Summary: Alter Table does not work for nested columns (was: Alter Table does not work)
> Alter Table does not work for nested columns
> --------------------------------------------
>
> Key: HIVE-17531
> URL: https://issues.apache.org/jira/browse/HIVE-17531
> Project: Hive
> Issue Type: Bug
> Components: Metastore
> Affects Versions: 2.1.1
> Environment: AWS EMR
> Reporter: Swaranga Sarma
>
> I have a table defined as:
>
> marketplaceid string
> requestid string
> purchaseid string
> customerid string
> sessionid string
> datestamp bigint
> deliverygroups array<struct<lineitems:array<struct<ourpriceamount:double,ourpricecurrencycode:string,quantity:int,upsellpromisequality:string,asin:string,merchant_id:bigint,validitemshipoptions:array<string>,upsellpromisedeliverydate:string>>,selectedssp:string,shipoptions:array<struct<isdefault:boolean,price:string,shipoptionname:string,upsellpromisequality:string,fasttrackpromisedeliverydate:bigint>>,deliveryprogram:string,validssp:string,deliverygroupid:string,preferredssp:string,addressid:string,selecteddeliveryoption:string>>
> year string
> month string
> day string
> hour string
> I am trying to add a new field to the deliveryGroups[*].shipOptions structure called qualifyingNoRushPromotionId of type string. I am using the below command to apply the change:
> ALTER TABLE my_table CHANGE COLUMN deliverygroups deliverygroups array<struct<lineitems:array<struct<ourpriceamount:double,ourpricecurrencycode:string,quantity:int,upsellpromisequality:string,asin:string,merchant_id:bigint,validitemshipoptions:array<string>,upsellpromisedeliverydate:string>>,selectedssp:string,shipoptions:array<struct<isdefault:boolean,price:string,shipoptionname:string,upsellpromisequality:string,fasttrackpromisedeliverydate:bigint,qualifyingNoRushPromotionId:string>>,deliveryprogram:string,validssp:string,deliverygroupid:string,preferredssp:string,addressid:string,selecteddeliveryoption:string>>;
> However I get the following error when I run this commend:
> FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Unable to alter table. The following columns have types incompatible with the existing columns in their respective positions :
> deliverygroups
> What could be the issue. Please assist.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)