marton-bod commented on code in PR #3225:
URL: https://github.com/apache/hive/pull/3225#discussion_r854146249
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergRecordWriter.java:
##########
@@ -37,17 +38,17 @@
class HiveIcebergRecordWriter extends HiveIcebergWriter {
- HiveIcebergRecordWriter(Schema schema, PartitionSpec spec, FileFormat format,
+ HiveIcebergRecordWriter(Schema schema, Map<Integer, PartitionSpec> specs,
FileFormat format,
FileWriterFactory<Record> fileWriterFactory, OutputFileFactory
fileFactory, FileIO io, long targetFileSize,
TaskAttemptID taskAttemptID, String tableName) {
- super(schema, spec, io, taskAttemptID, tableName,
+ super(schema, specs, io, taskAttemptID, tableName,
new ClusteredDataWriter<>(fileWriterFactory, fileFactory, io, format,
targetFileSize));
}
@Override
public void write(Writable row) throws IOException {
Record record = ((Container<Record>) row).get();
- writer.write(record, spec, partition(record));
+ writer.write(record, specs.get(specs.size() - 1), partition(record));
Review Comment:
Good catch, I did not know that Iceberg reused the old spec in step3. Will
store the latest spec in the record writer then
--
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]