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)

Reply via email to