The reader necessarily knows the number of partitions, since it's
responsible for generating its output partitions in the first place. I
won't speak for everyone, but it would make sense to me to pass in a
Partitioning instance to the writer, since it's already part of the v2
interface through the
I'd like to bump this. I agree with Carlos that there is very little
information at the DataSoruceWrite/DataSourceReader level. To me, ideally, the
DataSourceWriter/Reader should have as much information as possible. Not only
the number of partitions, but also ideally the whole execution plan.