cloud-fan commented on a change in pull request #25945: [SPARK-29248][SQL] Pass 
in number of partitions to WriteBuilder
URL: https://github.com/apache/spark/pull/25945#discussion_r329294622
 
 

 ##########
 File path: 
sql/catalyst/src/main/java/org/apache/spark/sql/connector/write/WriteBuilder.java
 ##########
 @@ -55,6 +55,16 @@ default WriteBuilder withInputDataSchema(StructType schema) 
{
     return this;
   }
 
+  /**
+   * Passes the number of partitions of the input data from Spark to data 
source.
+   *
+   * @return a new builder with the `schema`. By default it returns `this`, 
which means the given
+   *         `numPartitions` is ignored. Please override this method to take 
the `numPartitions`.
+   */
+  default WriteBuilder withNumPartitions(int numPartitions) {
 
 Review comment:
   @edrevo can you implement this approach here? I think adding a 
`numPartitions` is really a small change, we can set the main focus of this PR 
to improve this API.

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


With regards,
Apache Git Services

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

Reply via email to