From 4e08067a27074acb42c150dc985d385ca2e28986 Mon Sep 17 00:00:00 2001 From: Dongjoon Hyun Date: Wed, 25 Feb 2026 09:28:59 -0800 Subject: [PATCH] Revert "[SPARK-41398][SQL][FOLLOWUP] Update runtime filtering javadoc to reflect relaxed partition constraints" This reverts commit 38e51eb5e8d49bed5276a2fc71f1709f643d050f. --- .../spark/sql/connector/read/SupportsRuntimeFiltering.java | 6 ++---- .../sql/connector/read/SupportsRuntimeV2Filtering.java | 7 +++---- 2 files changed, 5 insertions(+), 8 deletions(-) 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 34bce404f375d..0921a90ac22a7 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,10 +51,8 @@ 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 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. + * 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. *

* 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 1bec81fe8184f..7c238bde969b2 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,10 +55,9 @@ 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 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. + * 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. *

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