[ 
https://issues.apache.org/jira/browse/IMPALA-11199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Boglarka Egyed resolved IMPALA-11199.
-------------------------------------
    Resolution: Fixed

Fixed in IMPALA-12605.

> 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
>            Assignee: Peter Rozsa
>            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.10#820010)

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

Reply via email to