edrevo opened a new pull request #25945: [SPARK-29248][SQL] Pass in number of 
partitions to WriteBuilder
URL: https://github.com/apache/spark/pull/25945
 
 
   ### What changes were proposed in this pull request?
   When implementing a ScanBuilder, we require the implementor to provide the 
schema of the data and the number of partitions.
   
   However, when someone is implementing WriteBuilder we only pass them the 
schema, but not the number of partitions. This is an asymetrical developer 
experience. 
   
   
   ### Why are the changes needed?
   Passing in the number of partitions on the WriteBuilder would enable data 
sources to provision their write targets before starting to write. For example:
   - it could be used to provision a Kafka topic with a specific number of 
partitions
   - it could be used to scale a microservice prior to sending the data to it
   - it could be used to create a DsV2 that sends the data to another spark 
cluster (currently not possible since the reader wouldn't be able to know the 
number of partitions)
   
   
   ### Does this PR introduce any user-facing change?
   No
   
   
   ### How was this patch tested?
   I ran the test, but I am getting an OOM error so I haven't been able to run 
the full suite.
   

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