rdblue commented on code in PR #15006:
URL: https://github.com/apache/iceberg/pull/15006#discussion_r2819785611
##########
core/src/main/java/org/apache/iceberg/io/OutputFileFactory.java:
##########
@@ -87,7 +87,26 @@ private OutputFileFactory(
}
public static Builder builderFor(Table table, int partitionId, long taskId) {
- return new Builder(table, partitionId, taskId);
+ return new Builder(
+ table.locationProvider(),
+ table.encryption(),
+ table::io,
+ table.spec(),
+ FileFormat.fromString(
+ table.properties().getOrDefault(DEFAULT_FILE_FORMAT,
DEFAULT_FILE_FORMAT_DEFAULT)),
+ partitionId,
+ taskId);
+ }
+
+ public static Builder builderFor(
Review Comment:
Why doesn't this create a builder and then configure it? Why does all of
this need to be passed into the builder constructor? Seems like that defeats
the purpose of the builder.
If the idea was to be able to create a builder without passing a table, that
seems reasonable. But this should use as many builder methods as possible.
--
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]