difin commented on code in PR #5389:
URL: https://github.com/apache/hive/pull/5389#discussion_r1711755648
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergTableUtil.java:
##########
@@ -396,45 +396,49 @@ public static PartitionData toPartitionData(StructLike
sourceKey, Types.StructTy
/**
* Returns list of data files filtered by specId and partitionPath as
following:
- * 1. If matchBySpecId is true, then filters files by specId == file's
specId, else by specId != file's specId
- * 2. If partitionPath is not null, then also filters files where
partitionPath == file's partition path
+ * 1. If table is unpartitioned, returns all data files without filtering.
+ * 2. If matchBySpecId is true, then filters files by specId == file's
specId, else by specId != file's specId
+ * 3. If partitionPath is not null, then also filters files where
partitionPath == file's partition path
* @param table the iceberg table
* @param specId partition spec id
* @param partitionPath partition path
- * @param matchBySpecId filter that's applied on data files' spec ids
*/
- public static List<DataFile> getDataFiles(Table table, int specId, String
partitionPath,
- Predicate<Object> matchBySpecId) {
+ public static List<DataFile> getDataFiles(Table table, Integer specId,
String partitionPath) {
Review Comment:
The specId is not necessary the latest spec id, it is the partition's spec
id.
Compaction may be requested for a partition of an older partition spec and
in this case the spec id will be the spec if of that old partition. Because of
that I would suggest to rename it to `partitionSpecId` if you are ok.
--
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]