[
https://issues.apache.org/jira/browse/HIVE-26868?focusedWorklogId=836380&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-836380
]
ASF GitHub Bot logged work on HIVE-26868:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Jan/23 09:57
Start Date: 02/Jan/23 09:57
Worklog Time Spent: 10m
Work Description: deniskuzZ commented on code in PR #3872:
URL: https://github.com/apache/hive/pull/3872#discussion_r1059930271
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -582,6 +582,11 @@ public void validateSinkDesc(FileSinkDesc sinkDesc) throws
SemanticException {
HiveStorageHandler.super.validateSinkDesc(sinkDesc);
if (sinkDesc.getInsertOverwrite()) {
Table table = IcebergTableUtil.getTable(conf,
sinkDesc.getTableInfo().getProperties());
+ if (table.currentSnapshot() != null &&
+ "0"
.equalsIgnoreCase(table.currentSnapshot().summary().get(SnapshotSummary.TOTAL_RECORDS_PROP)))
{
Review Comment:
should we move the check to line 594?
Issue Time Tracking
-------------------
Worklog Id: (was: 836380)
Time Spent: 40m (was: 0.5h)
> Iceberg: Allow IOW on empty table with Partition Evolution
> ----------------------------------------------------------
>
> Key: HIVE-26868
> URL: https://issues.apache.org/jira/browse/HIVE-26868
> Project: Hive
> Issue Type: Improvement
> Reporter: Ayush Saxena
> Assignee: Ayush Saxena
> Priority: Major
> Labels: pull-request-available
> Time Spent: 40m
> Remaining Estimate: 0h
>
> In case an iceberg table has gone through partition evolution, we don't allow
> an IOW operation on it.
> But if it is empty, we can allow an IOW since there ain't any data which can
> get messed by overwrite.
> This helps to compact data, & merge the delete files into data file
> via
> Truncate -> IOW with Snapshot ID before Truncate.
> Same flow is used by Impala for compacting Iceberg tables.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)