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 "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/03/09 14:14:00 UTC

[jira] [Commented] (IMPALA-11906) Impala Doc: Support non unique primary key for Kudu table

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

ASF subversion and git services commented on IMPALA-11906:
----------------------------------------------------------

Commit 27e238c8cf31e5c28ad0fe63a1aeabf2a6e05414 in impala's branch refs/heads/master from Shajini Thayasingh
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=27e238c8c ]

IMPALA-11906: [DOCS] Document the support for non-unique primary key

Incorporated the comments received.
Added a new sub-section.
Change-Id: I7b5a452f2199d097077150c012497aa4a3ecf7d9
Reviewed-on: http://gerrit.cloudera.org:8080/19587
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-by: Abhishek Chennaka <ac...@cloudera.com>
Reviewed-by: Wenzhe Zhou <wz...@cloudera.com>


> Impala Doc: Support non unique primary key for Kudu table
> ---------------------------------------------------------
>
>                 Key: IMPALA-11906
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11906
>             Project: IMPALA
>          Issue Type: Documentation
>          Components: Docs
>    Affects Versions: Impala 4.3.0
>            Reporter: Wenzhe Zhou
>            Assignee: shajini thayasingh
>            Priority: Major
>              Labels: documentation
>             Fix For: Impala 4.3.0
>
>
> IMPALA-11809 Added support non unique primary key for Kudu table. We should document the syntax for non unique primary key.
> - We added syntactic support for creating Kudu table with non unique primary key.
>   For example: 
>     CREATE TABLE tbl (id INT NON UNIQUE PRIMARY KEY, name STRING)
>     PARTITION BY HASH (id) PARTITIONS 3
>     STORED as KUDU;
>   More samples could be found in the commit messages of https://issues.apache.org/jira/browse/IMPALA-11809
> - Kudu engine appends a system generated auto-incrementing column to the non unique primary key columns to guarantee the uniqueness on primary key. This auto-incrementing column is named as 'auto_incrementing_id' with bigint type. The assignment to it during insertion is automatic.
> 'auto_incrementing_id' column cannot be added, removed or renamed with ALTER TABLE statements.
> - When creating a Kudu table, specifying PRIMARY KEY is optional now. If there is no primary key attribute specified, the partition key columns could be promoted as non unique primary key if those columns are the beginning columns of the table.
> In following sample, 'a' and 'b' will be promoted as non unique primary key, 'auto_incrementing_id' column will be added by Kudu engine.  'a', 'b' and 'auto_incrementing_id' form the effective unique composite primary key.
>     CREATE TABLE tbl (a INT, b STRING, c FLOAT)
>      PARTITION BY HASH (a, b) PARTITIONS 3
>      STORED as KUDU;
> - New column "key_unique" is added to the output of 'describe' table command for Kudu table, which shows if the primary key is unique.
> -  SELECT statement does not show the system generated auto-incrementing column unless the column is explicitly specified in the select list.
> - UPSERT operation is not supported for Kudu tables with non unique primary key.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org