diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProvider.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProvider.java index 678c53282d63..22cef9576b14 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProvider.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProvider.java @@ -429,7 +429,9 @@ private TupleDomain getEffectivePredicate( if (!partitionMatchesPredicate(partitionColumns, partitionValues, dynamicFilterPredicate)) { return TupleDomain.none(); } - + // Filter out partition columns domains from the dynamic filter because they should be irrelevant at data file level + dynamicFilterPredicate = dynamicFilterPredicate + .filter((columnHandle, domain) -> !partitionKeys.containsKey(columnHandle.getId())); return unenforcedPredicate.intersect(dynamicFilterPredicate); }