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 "Tamas Mate (Jira)" <ji...@apache.org> on 2022/06/23 15:01:00 UTC
[jira] [Assigned] (IMPALA-11199) Use UpdatePartitionSpec API to alter Iceberg partition specs
[ https://issues.apache.org/jira/browse/IMPALA-11199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tamas Mate reassigned IMPALA-11199:
-----------------------------------
Assignee: (was: Tamas Mate)
> Use UpdatePartitionSpec API to alter Iceberg partition specs
> ------------------------------------------------------------
>
> Key: IMPALA-11199
> URL: https://issues.apache.org/jira/browse/IMPALA-11199
> Project: IMPALA
> Issue Type: Improvement
> Components: Frontend
> Affects Versions: Impala 4.1.0
> Reporter: Tamas Mate
> Priority: Major
> Labels: impala-iceberg
>
> Impala uses the iceberg TableMetadata object dugin [alterTableSetPartitionSpec |https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/service/IcebergCatalogOpExecutor.java#L166]. This class is part of the core package which ideally should not be accessed by external applications:
> {code:java}
> BaseTable iceTable = (BaseTable)IcebergUtil.loadTable(feTable);
> TableOperations tableOp = iceTable.operations();
> TableMetadata metadata = tableOp.current();
> Schema schema = metadata.schema();
> PartitionSpec newPartSpec = IcebergUtil.createIcebergPartition(schema, partSpec);
> TableMetadata newMetadata = metadata.updatePartitionSpec(newPartSpec);
> Map<String, String> properties = new HashMap<>(newMetadata.properties());
> {code}
> Iceberg has an [UpdatePartitionSpec|https://github.com/apache/iceberg/blob/master/api/src/main/java/org/apache/iceberg/UpdatePartitionSpec.java#L32] api, which should be used in these situations if possible.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org