You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/11/26 17:17:40 UTC

[GitHub] [spark] stczwd commented on a change in pull request #30514: [SPARK-33569][SQL] Remove getting partitions by an identifier prefix.

stczwd commented on a change in pull request #30514:
URL: https://github.com/apache/spark/pull/30514#discussion_r531151955



##########
File path: sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/SupportsPartitionManagement.java
##########
@@ -105,20 +108,12 @@ void replacePartitionMetadata(
     Map<String, String> loadPartitionMetadata(InternalRow ident)
         throws UnsupportedOperationException;
 
-    /**
-     * List the identifiers of all partitions that have the ident prefix in a table.
-     *
-     * @param ident a prefix of partition identifier
-     * @return an array of Identifiers for the partitions
-     */
-    InternalRow[] listPartitionIdentifiers(InternalRow ident);
-
     /**
      * List the identifiers of all partitions that match to the ident by names.
      *
      * @param names the names of partition values in the identifier.
      * @param ident a partition identifier values.
      * @return an array of Identifiers for the partitions
      */
-    InternalRow[] listPartitionByNames(String[] names, InternalRow ident);
+    InternalRow[] listPartitionIdentifiers(String[] names, InternalRow ident);

Review comment:
       How about `listPartitionIdentifiers(StructType column, InternalRow ident)`?

##########
File path: sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/SupportsPartitionManagement.java
##########
@@ -79,7 +80,9 @@ void createPartition(
      * @return true if the partition exists, false otherwise
      */
     default boolean partitionExists(InternalRow ident) {

Review comment:
       This PR also changed this API. In the past, we coud use this API to check wether table had partitions




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org