You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Anurag Mantripragada (JIRA)" <ji...@apache.org> on 2019/03/06 00:55:00 UTC
[jira] [Updated] (IMPALA-2112) Support primary key/foreign key
constraint as part of create table in Impala
[ https://issues.apache.org/jira/browse/IMPALA-2112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anurag Mantripragada updated IMPALA-2112:
-----------------------------------------
Description:
These would be advisory, ie, Impala would not attempt to enforce them. However, they could be used for cardinality estimation during query planning.
To be compatible with Hive:
* We neither enforce or validate integrity constraints. Hence, DISABLE and NOVALIDATE options are mandatory.
* RELY/NORELY is optional. The CBO is expected to use this information when a user specifies “RELY”. The default is NORELY.
* Since we do not yet have UNIQUE in Hive, the FK mentioned must be Primary Key column in parent table.
Support create table syntax like hive does:
* {{create table pk(id1 integer, id2 integer, }}{{primary key(id1, id2) DISABLE NOVALIDATE);}}
* {{create table fk(id1 integer, id2 integer, }}{{constraint c1 foreign key(id1, id2) references pk(id2, id1) DISABLE NOVALIDATE);}}
* {{create table T1(id integer, name string, primary key(id) DISABLE NOVALIDATE RELY}}
was:
These would be advisory, ie, Impala would not attempt to enforce them. However, they could be used for cardinality estimation during query planning.
To be compatible with Hive:
* We neither enforce or validate integrity constraints. Hence, DISABLE and NOVALIDATE options are mandatory.
* RELY/NORELY is optional. The CBO is expected to use this information when a user specifies “RELY”. The default is NORELY.
* Since we do not yet have UNIQUE in Hive, the FK mentioned must be Primary Key column in parent table.
Support create table syntax like hive does:
* {{create table pk(id1 integer, id2 integer, }}{{primary key(id1, id2) DIASBLE NOVALIDATE);}}
* {{create table fk(id1 integer, id2 integer, }}{{constraint c1 foreign key(id1, id2) references pk(id2, id1) DISABLE NOVALIDATE);}}
* {{create table T1(id integer, name string, primary key(id) DISABLE NOVALIDATE RELY}}
> Support primary key/foreign key constraint as part of create table in Impala
> ----------------------------------------------------------------------------
>
> Key: IMPALA-2112
> URL: https://issues.apache.org/jira/browse/IMPALA-2112
> Project: IMPALA
> Issue Type: Sub-task
> Components: Catalog, Frontend
> Affects Versions: Impala 2.2
> Reporter: Marcel Kornacker
> Assignee: Anurag Mantripragada
> Priority: Minor
> Labels: planner
>
> These would be advisory, ie, Impala would not attempt to enforce them. However, they could be used for cardinality estimation during query planning.
> To be compatible with Hive:
> * We neither enforce or validate integrity constraints. Hence, DISABLE and NOVALIDATE options are mandatory.
> * RELY/NORELY is optional. The CBO is expected to use this information when a user specifies “RELY”. The default is NORELY.
> * Since we do not yet have UNIQUE in Hive, the FK mentioned must be Primary Key column in parent table.
> Support create table syntax like hive does:
> * {{create table pk(id1 integer, id2 integer, }}{{primary key(id1, id2) DISABLE NOVALIDATE);}}
> * {{create table fk(id1 integer, id2 integer, }}{{constraint c1 foreign key(id1, id2) references pk(id2, id1) DISABLE NOVALIDATE);}}
> * {{create table T1(id integer, name string, primary key(id) DISABLE NOVALIDATE RELY}}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org