rdblue 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_r329154251
##########
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:
If we want to take this approach, then let's do it now before a release.
Otherwise we should use the original implementation to add an additional method
because that is a compatible change.
----------------------------------------------------------------
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]