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 "Gabor Kaszab (Jira)" <ji...@apache.org> on 2024/01/18 12:27:00 UTC

[jira] [Created] (IMPALA-12729) Allow creating primary keys for Iceberg tables

Gabor Kaszab created IMPALA-12729:
-------------------------------------

             Summary: Allow creating primary keys for Iceberg tables
                 Key: IMPALA-12729
                 URL: https://issues.apache.org/jira/browse/IMPALA-12729
             Project: IMPALA
          Issue Type: Improvement
          Components: Frontend
            Reporter: Gabor Kaszab


Some writer engines require primary keys on a table so that they can use them for writing equality deletes (only the PK cols are written to the eq-delete files).

Impala currently doesn't reject setting PKs for Iceberg tables, however it seems to omit them. This suceeds:
{code:java}
create table ice_pk (i int, j int, primary key(i)) stored as iceberg;
{code}
However, DESCRIBE EXTENDED doesn't show 'identifier-field-ids' in the 'current-schema'.

On the other hand for a table created by Flink these fields are there:
{code:java}
current-schema                                     | {\"type\":\"struct\",\"schema-id\":0,\"identifier-field-ids\":[1],\"fields\":[{\"id\":1,\"name\":\"i\",\"required\":true,\"type\":\"int\"},{\"id\":2,\"name\":\"s\",\"required\":false,\"type\":\"string\"}]} {code}
Part2:

SHOW CREATE TABLE should also correctly print the primary key part of the field list.



--
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