rdblue commented on a change in pull request #2858:
URL: https://github.com/apache/iceberg/pull/2858#discussion_r676745707
##########
File path: spark2/src/main/java/org/apache/iceberg/spark/source/Writer.java
##########
@@ -263,7 +263,7 @@ public String toString() {
public DataWriter<InternalRow> createDataWriter(int partitionId, long
taskId, long epochId) {
Table table = tableBroadcast.value();
- OutputFileFactory fileFactory = new OutputFileFactory(table, format,
partitionId, taskId);
+ OutputFileFactory fileFactory = OutputFileFactory.builderFor(table,
format, partitionId, taskId).build();
Review comment:
I think the intent is to make table, partition, and task required.
Otherwise, it isn't obvious that the builder will fail at runtime if you don't
call `withTaskId`. It makes sense to me to avoid runtime issues by adding the
required arguments to `builderFor` and anything that can be customized as a
builder method.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]