rdblue commented on code in PR #3998:
URL: https://github.com/apache/iceberg/pull/3998#discussion_r891625270
##########
flink/v1.15/flink/src/main/java/org/apache/iceberg/flink/sink/RowDataTaskWriterFactory.java:
##########
@@ -70,22 +88,26 @@ public RowDataTaskWriterFactory(Table table,
this.upsert = upsert;
if (equalityFieldIds == null || equalityFieldIds.isEmpty()) {
- this.appenderFactory = new FlinkAppenderFactory(schema, flinkSchema,
table.properties(), spec);
+ this.appenderFactory = new FlinkAppenderFactory(schema, flinkSchema,
properties, spec);
} else if (upsert) {
// In upsert mode, only the new row is emitted using INSERT row kind.
Therefore, any column of the inserted row
// may differ from the deleted row other than the primary key fields,
and the delete file must contain values
// that are correct for the deleted row. Therefore, only write the
equality delete fields.
- this.appenderFactory = new FlinkAppenderFactory(schema, flinkSchema,
table.properties(), spec,
+ this.appenderFactory = new FlinkAppenderFactory(schema, flinkSchema,
properties, spec,
ArrayUtil.toIntArray(equalityFieldIds), TypeUtil.select(schema,
Sets.newHashSet(equalityFieldIds)), null);
} else {
- this.appenderFactory = new FlinkAppenderFactory(schema, flinkSchema,
table.properties(), spec,
+ this.appenderFactory = new FlinkAppenderFactory(schema, flinkSchema,
properties, spec,
ArrayUtil.toIntArray(equalityFieldIds), schema, null);
}
}
@Override
public void initialize(int taskId, int attemptId) {
- this.outputFileFactory = OutputFileFactory.builderFor(table, taskId,
attemptId).build();
+ String formatAsString = PropertyUtil.propertyAsString(properties,
DEFAULT_FILE_FORMAT, DEFAULT_FILE_FORMAT_DEFAULT);
+ FileFormat fileFormat =
FileFormat.valueOf(formatAsString.toUpperCase(Locale.ROOT));
Review Comment:
Either one is okay.
--
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]