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



##########
File path: 
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/SupportsPartitionManagement.java
##########
@@ -76,13 +75,18 @@ void createPartition(
     /**
      * Test whether a partition exists using an {@link InternalRow ident} from 
the table.
      *
-     * @param ident a partition identifier
+     * @param ident a partition identifier which must contain all partition 
fields in order
      * @return true if the partition exists, false otherwise
      */
     default boolean partitionExists(InternalRow ident) {
-        String[] partitionNames = partitionSchema().names();
-        String[] requiredNames = Arrays.copyOfRange(partitionNames, 0, 
ident.numFields());
-        return listPartitionIdentifiers(requiredNames, ident).length > 0;
+      String[] partitionNames = partitionSchema().names();

Review comment:
       I hope the indentation of 2 spaces are ok. I see that in other Java 
classes.




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