HeartSaVioR commented on a change in pull request #31355:
URL: https://github.com/apache/spark/pull/31355#discussion_r577125087



##########
File path: 
sql/catalyst/src/main/java/org/apache/spark/sql/connector/write/RequiresDistributionAndOrdering.java
##########
@@ -42,6 +42,15 @@
    */
   Distribution requiredDistribution();
 
+  /**
+   * Returns the number of partitions required by this write.
+   * <p>
+   * Implementations may want to override this if it requires the specific 
number of partitions.
+   *
+   * @return the required number of partitions, non-positive values mean no 
requirement.

Review comment:
       Probably you've worried about the possible confusion on inclusion of 
"0". While non-positive isn't wrong I agree it's less intuitive (less 
straightforward). Thanks for the suggestion!




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to