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

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

Commit 13e99384ae8e6b86f3a1aedc61dff34fd25b0a84 in impala's branch 
refs/heads/master from Eyizoha
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=13e99384a ]

IMPALA-11776: Use hive.metastore.table.owner for create iceberg table

IMPALA-11429 made the creation of an Iceberg table happen in 2 steps.
The first step creates the table, however, with wrong owner and the
second step is an ALTER TABLE to set the correct table owner.

Since Iceberg 1.1.0 there is now a way to provide a table owner via a
table property so we can make the create table operation to take one
step again.
https://github.com/apache/iceberg/pull/5763
https://github.com/apache/iceberg/pull/6154

This patch implements this behavior, when creating an Iceberg table
through HiveCatalog, specifying HMS_TABLE_OWNER as
hive.metastore.table.owner in properties can do it in one step.

Testing:
- Use the existing test test_iceberg.py test_table_owner.

Change-Id: I56ef7929449105af571d1fb9cb585d9b0733a39d
Reviewed-on: http://gerrit.cloudera.org:8080/20646
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> Newly created Iceberg tables are owned by the user of the CatalogD process
> --------------------------------------------------------------------------
>
>                 Key: IMPALA-11429
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11429
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Catalog
>            Reporter: Zoltán Borók-Nagy
>            Assignee: Gabor Kaszab
>            Priority: Major
>              Labels: impala-iceberg
>             Fix For: Impala 4.2.0
>
>
> Repro:
> {noformat}
> > impala-shell.sh -u johndoe
> impala-shell> create table ice_t (i int) stored as iceberg;
> impala-shell> describe formatted ice_t;
> ...
> | Owner:                       | impala                                     |
> ...
> {noformat}
> The owner should be the user executing the query.
> Unfortunately Iceberg doesn't allow us setting the owner of the table. It 
> uses the system-wide property "user.name" to set the owner:
> [https://github.com/apache/iceberg/blob/51a9702367e22aff635ae05f2a313a19c3ba2fb8/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java#L347]
> We might need Iceberg-side modifications as well to specify the owner. 
> Alternatively we could add an exter alter_table() RPC to change the owner.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to