difin commented on code in PR #5123:
URL: https://github.com/apache/hive/pull/5123#discussion_r1571421601
##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/compact/AlterTableCompactOperation.java:
##########
@@ -62,6 +65,12 @@ public AlterTableCompactOperation(DDLOperationContext
context, AlterTableCompact
throw new HiveException(ErrorMsg.NONACID_COMPACTION_NOT_SUPPORTED,
table.getDbName(), table.getTableName());
}
+ if (desc.getPartitionSpec() != null && DDLUtils.isIcebergTable(table) &&
Review Comment:
For the identity partition table validation, the suggested code works only
for Iceberg tables, but not for native.
Modified to:
```
public static boolean isIdentityPartitionTable(Table table) {
return table.getStorageHandler() == null ||
table.getStorageHandler().getPartitionTransformSpec(table).stream()
.map(TransformSpec::getTransformType)
.allMatch(type -> type == TransformSpec.TransformType.IDENTITY);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]