diff --git a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/read/SupportsRuntimeFiltering.java b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/read/SupportsRuntimeFiltering.java index 0921a90ac22a7..34bce404f375d 100644 --- a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/read/SupportsRuntimeFiltering.java +++ b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/read/SupportsRuntimeFiltering.java @@ -51,8 +51,10 @@ public interface SupportsRuntimeFiltering extends SupportsRuntimeV2Filtering { * the originally reported partitioning during runtime filtering. While applying runtime filters, * the scan may detect that some {@link InputPartition}s have no matching data. It can omit * such partitions entirely only if it does not report a specific partitioning. Otherwise, - * the scan can replace the initially planned {@link InputPartition}s that have no matching - * data with empty {@link InputPartition}s but must preserve the overall number of partitions. + * the scan can either replace the initially planned {@link InputPartition}s that have no + * matching data with empty {@link InputPartition}s, or report only a subset of the original + * partition values (omitting those with no data). The scan must not report new partition values + * that were not present in the original partitioning. *

* Note that Spark will call {@link Scan#toBatch()} again after filtering the scan at runtime. * diff --git a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/read/SupportsRuntimeV2Filtering.java b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/read/SupportsRuntimeV2Filtering.java index 7c238bde969b2..1bec81fe8184f 100644 --- a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/read/SupportsRuntimeV2Filtering.java +++ b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/read/SupportsRuntimeV2Filtering.java @@ -55,9 +55,10 @@ public interface SupportsRuntimeV2Filtering extends Scan { * the originally reported partitioning during runtime filtering. While applying runtime * predicates, the scan may detect that some {@link InputPartition}s have no matching data. It * can omit such partitions entirely only if it does not report a specific partitioning. - * Otherwise, the scan can replace the initially planned {@link InputPartition}s that have no - * matching data with empty {@link InputPartition}s but must preserve the overall number of - * partitions. + * Otherwise, the scan can either replace the initially planned {@link InputPartition}s that + * have no matching data with empty {@link InputPartition}s, or report only a subset of the + * original partition values (omitting those with no data). The scan must not report new + * partition values that were not present in the original partitioning. *

* Note that Spark will call {@link Scan#toBatch()} again after filtering the scan at runtime. *