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/30 09:06:23 UTC

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

cloud-fan commented on a change in pull request #30514:
URL: https://github.com/apache/spark/pull/30514#discussion_r532440040



##########
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) {
-        return listPartitionIdentifiers(ident).length > 0;
+        String[] partitionNames = partitionSchema().names();
+        String[] requiredNames = Arrays.copyOfRange(partitionNames, 0, ident.numFields());

Review comment:
       shall we fail if the given `ident` is only a prefix? `partitionExists` sounds like it should be applied to a certain partition.
   
   BTW which command needs it?




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