Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-3531 Implement deferrable and optionally enforced PK/FK constraints
  3. IMPALA-2112

Support primary key/foreign key constraint as part of create table in Impala

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • Impala 2.2
    • None
    • Catalog, Frontend

    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, foreign key(id1, id2) references pk(id2, id1) DISABLE NOVALIDATE);
      • create table T1(id integer, name string, primary key(id) DISABLE NOVALIDATE RELY

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            anuragmantri Anurag Mantripragada
            marcelk Marcel Kinard
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment