aokolnychyi commented on a change in pull request #2362:
URL: https://github.com/apache/iceberg/pull/2362#discussion_r608851528
##########
File path: spark3/src/main/java/org/apache/iceberg/spark/source/SparkWrite.java
##########
@@ -513,17 +512,22 @@ protected WriterFactory(PartitionSpec spec, FileFormat
format, LocationProvider
@Override
public DataWriter<InternalRow> createWriter(int partitionId, long taskId,
long epochId) {
- OutputFileFactory fileFactory = new OutputFileFactory(
- spec, format, locations, io.value(), encryptionManager.value(),
partitionId, taskId);
- SparkAppenderFactory appenderFactory = new
SparkAppenderFactory(properties, writeSchema, dsSchema, spec);
+ Table table = tableBroadcast.getValue();
+
+ OutputFileFactory fileFactory = new OutputFileFactory(table, format,
partitionId, taskId);
+ SparkAppenderFactory appenderFactory = new SparkAppenderFactory(table,
writeSchema, dsSchema);
+
+ PartitionSpec spec = table.spec();
+ FileIO io = table.io();
+
if (spec.isUnpartitioned()) {
- return new Unpartitioned3Writer(spec, format, appenderFactory,
fileFactory, io.value(), targetFileSize);
Review comment:
I think so but it will have to touch more than one query engine so I
stopped here for now. Sounds like a good follow-up item.
--
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]