diff --git a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/PartitionColumnReference.java b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/PartitionFieldReference.java similarity index 78% rename from sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/PartitionColumnReference.java rename to sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/PartitionFieldReference.java index ef516545812b9..0a51f0dfd8540 100644 --- a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/PartitionColumnReference.java +++ b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/PartitionFieldReference.java @@ -21,19 +21,19 @@ import org.apache.spark.sql.connector.catalog.Table; /** - * A reference to a partition column in {@link Table#partitioning()}. + * A reference to a partition field in {@link Table#partitioning()}. *

- * {@link #fieldNames()} returns the partition column name (or names) as reported by + * {@link #fieldNames()} returns the partition field name (or names) as reported by * the table's partition schema. * {@link #ordinal()} returns the 0-based position in {@link Table#partitioning()}. * * @since 4.2.0 */ @Evolving -public interface PartitionColumnReference extends NamedReference { +public interface PartitionFieldReference extends NamedReference { /** - * Returns the 0-based ordinal of this partition column in {@link Table#partitioning()}. + * Returns the 0-based ordinal of this partition field in {@link Table#partitioning()}. */ int ordinal(); } diff --git a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/filter/PartitionPredicate.java b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/filter/PartitionPredicate.java index dbc31aa1a4583..1e579a39f27c6 100644 --- a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/filter/PartitionPredicate.java +++ b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/filter/PartitionPredicate.java @@ -21,9 +21,7 @@ import org.apache.spark.sql.catalyst.InternalRow; import org.apache.spark.sql.connector.catalog.Table; import org.apache.spark.sql.connector.expressions.NamedReference; -import org.apache.spark.sql.connector.expressions.PartitionColumnReference; - -import static org.apache.spark.sql.connector.expressions.Expression.EMPTY_EXPRESSION; +import org.apache.spark.sql.connector.expressions.PartitionFieldReference; /** * Represents a partition predicate that can be evaluated using {@link Table#partitioning()}. @@ -47,17 +45,17 @@ protected PartitionPredicate() { /** * {@inheritDoc} *

- * For PartitionPredicate, returns {@link PartitionColumnReference} instances that identify - * the partition columns (from {@link Table#partitioning()}) referenced by this predicate. - * Each reference's {@link PartitionColumnReference#fieldNames()} gives the partition column - * name; {@link PartitionColumnReference#ordinal()} gives the 0-based position in + * For PartitionPredicate, returns {@link PartitionFieldReference} instances that identify + * the partition fields (from {@link Table#partitioning()}) referenced by this predicate. + * Each reference's {@link PartitionFieldReference#fieldNames()} gives the partition field + * name; {@link PartitionFieldReference#ordinal()} gives the 0-based position in * {@link Table#partitioning()}. *

* Example: Suppose {@code Table.partitioning()} returns three partition * transforms: {@code [years(ts), months(ts), bucket(32, id)]} with ordinals 0, 1, 2. - * Each {@link PartitionColumnReference} has {@link PartitionColumnReference#fieldNames()} + * Each {@link PartitionFieldReference} has {@link PartitionFieldReference#fieldNames()} * (the transform display name, e.g. {@code years(ts)}) and - * {@link PartitionColumnReference#ordinal()}: + * {@link PartitionFieldReference#ordinal()}: *