hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nita Dembla (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-18001) InvalidObjectException while creating Primary Key constraint on partition key column
Date Tue, 07 Nov 2017 18:34:00 GMT

    [ https://issues.apache.org/jira/browse/HIVE-18001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16242589#comment-16242589
] 

Nita Dembla commented on HIVE-18001:
------------------------------------

Similar problem happens with Foreign Key  on partition key column.

alter table catalog_sales add constraint cs_d2 foreign key  (cs_sold_date_sk) references date_dim
(d_date_sk) disable novalidate rely;

> InvalidObjectException while creating Primary Key constraint on partition key column
> ------------------------------------------------------------------------------------
>
>                 Key: HIVE-18001
>                 URL: https://issues.apache.org/jira/browse/HIVE-18001
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Nita Dembla
>            Assignee: Jesus Camacho Rodriguez
>
> {code}
> hive> show create table inventory;
> OK
> CREATE TABLE `inventory`(
>   `inv_item_sk` bigint,
>   `inv_warehouse_sk` bigint,
>   `inv_quantity_on_hand` int)
> PARTITIONED BY (
>   `inv_date_sk` bigint)
> ROW FORMAT SERDE
>   'org.apache.hadoop.hive.ql.io.orc.OrcSerde'
> STORED AS INPUTFORMAT
>   'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'
> OUTPUTFORMAT
>   'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
> LOCATION
>   'hdfs://ctr-e134-1499953498516-233086-01-000002.hwx.site:8020/apps/hive/warehouse/tpcds_bin_partitioned_orc_1000.db/inventory'
> TBLPROPERTIES (
>   'transient_lastDdlTime'='1508284425')
> Time taken: 0.25 seconds, Fetched: 16 row(s)
> hive> alter table inventory add constraint pk_in primary key (inv_date_sk, inv_item_sk,
inv_warehouse_sk) disable novalidate rely;
> FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. InvalidObjectException(message:Parent
column not found: inv_date_sk)
> {code}
> Exception from the log
> {code}
> 2017-11-07T18:17:50,516 ERROR [d4ed6f97-20ea-4bc8-a046-b0646f483a20 main] exec.DDLTask:
Failed
> org.apache.hadoop.hive.ql.metadata.HiveException: InvalidObjectException(message:Parent
column not found: inv_date_sk)
>         at org.apache.hadoop.hive.ql.metadata.Hive.addPrimaryKey(Hive.java:4668) ~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.ql.exec.DDLTask.addConstraints(DDLTask.java:4356) ~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:413) ~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:206) ~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:97)
~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2276) ~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1906) ~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1623) ~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1362) ~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1352) ~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:239) ~[hive-cli-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:187) ~[hive-cli-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:409) ~[hive-cli-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:827) ~[hive-cli-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:765) ~[hive-cli-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:692) ~[hive-cli-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_112]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_112]
>         at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
>         at org.apache.hadoop.util.RunJar.run(RunJar.java:233) ~[hadoop-common-2.7.3.2.6.2.0-205.jar:?]
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:148) ~[hadoop-common-2.7.3.2.6.2.0-205.jar:?]
> Caused by: org.apache.hadoop.hive.metastore.api.InvalidObjectException: Parent column
not found: inv_date_sk
>         at org.apache.hadoop.hive.metastore.ObjectStore.addPrimaryKeys(ObjectStore.java:4190)
~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.metastore.ObjectStore.addPrimaryKeys(ObjectStore.java:4163)
~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_112]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_112]
>         at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
>         at org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:97)
~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at com.sun.proxy.$Proxy39.addPrimaryKeys(Unknown Source) ~[?:?]
>         at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.add_primary_key(HiveMetaStore.java:1718)
~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_112]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_112]
>         at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
>         at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148)
~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107)
~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at com.sun.proxy.$Proxy42.add_primary_key(Unknown Source) ~[?:?]
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.addPrimaryKey(HiveMetaStoreClient.java:819)
~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_112]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_112]
>         at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
>         at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:173)
~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         at com.sun.proxy.$Proxy43.addPrimaryKey(Unknown Source) ~[?:?]
>         at org.apache.hadoop.hive.ql.metadata.Hive.addPrimaryKey(Hive.java:4666) ~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
>         ... 21 more
> 2017-11-07T18:17:50,517  INFO [d4ed6f97-20ea-4bc8-a046-b0646f483a20 main] hooks.ATSHook:
Created ATS Hook
> 2017-11-07T18:17:50,519 ERROR [d4ed6f97-20ea-4bc8-a046-b0646f483a20 main] ql.Driver:
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. InvalidObjectException(message:Parent
column not found: inv_date_sk)
> 2017-11-07T18:17:50,519  INFO [d4ed6f97-20ea-4bc8-a046-b0646f483a20 main] ql.Driver:
Completed executing command(queryId=root_20171107181750_b5b6298f-57aa-4457-9848-368882dbf020);
Time taken: 0.086 seconds
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message