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



##########
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:
       `StructType` requires to set additional fields like `nullable`, 
`metadata` and etc. that could be not necessary to list partitions. For 
example, I use this method in 
https://github.com/apache/spark/pull/30398/files#diff-b8fcff1b4de2d6e3641609dc02db791af8c56c2660123fa2b4afd408597fb401R44
 where names are coming from `ResolvedPartitionSpec`. With our proposal, I will 
have to extract `StructType` from the partition schema before calling 
`listPartitionIdentifiers` which is not convenient ( and necessary) from my 
point of view. 




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to