difin commented on code in PR #5393:
URL: https://github.com/apache/hive/pull/5393#discussion_r1744089463
##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/compact/AlterTableCompactOperation.java:
##########
@@ -108,7 +119,9 @@ public AlterTableCompactOperation(DDLOperationContext
context, AlterTableCompact
}
// If Iceberg table had partition evolution, it will create compaction
request without partition specification,
// and it will compact all files from old partition specs, besides
compacting partitions of current spec in parallel.
- if (DDLUtils.isIcebergTable(table) &&
table.getStorageHandler().hasUndergonePartitionEvolution(table)) {
+ if (DDLUtils.isIcebergTable(table) &&
table.getStorageHandler().hasUndergonePartitionEvolution(table) &&
+ (desc.getFilterExpr() == null || !table.getStorageHandler()
+ .getPartitionsWithFilter(table, desc.getFilterExpr(),
false).isEmpty())) {
Review Comment:
I am using `isFilterMatching` (renamed to `hasDataMatchingFilterExpr` for
better readability) for checking if filter matches any records on an
unpartitioned table.
The above piece of code checks if the Iceberg table had partition evolution
and filter expression matches any records from old partition specs.
--
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]