openinx commented on a change in pull request #1774:
URL: https://github.com/apache/iceberg/pull/1774#discussion_r530733237
##########
File path: spark3/src/main/java/org/apache/iceberg/spark/source/SparkWrite.java
##########
@@ -420,8 +430,15 @@ protected WriterFactory(PartitionSpec spec, FileFormat
format, LocationProvider
if (spec.fields().isEmpty()) {
return new Unpartitioned3Writer(spec, format, appenderFactory,
fileFactory, io.value(), targetFileSize);
} else {
- return new Partitioned3Writer(
- spec, format, appenderFactory, fileFactory, io.value(),
targetFileSize, writeSchema, dsSchema);
+ if (partitionedFanoutEnabled) {
Review comment:
ditto
##########
File path: spark3/src/main/java/org/apache/iceberg/spark/source/SparkWrite.java
##########
@@ -455,4 +472,20 @@ public WriterCommitMessage commit() throws IOException {
return new TaskCommit(complete());
}
}
+
+ private static class PartitionedFanout3Writer extends
SparkPartitionedFanoutWriter
+ implements DataWriter<InternalRow> {
+ PartitionedFanout3Writer(PartitionSpec spec, FileFormat format,
SparkAppenderFactory appenderFactory,
Review comment:
nit: format
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]