Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.avro.file.CodecFactory;
import org.apache.avro.file.DataFileWriter;
import org.apache.avro.io.DatumWriter;
import org.apache.avro.io.EncoderFactory;
import org.apache.iceberg.Metrics;
import org.apache.iceberg.MetricsConfig;
import org.apache.iceberg.exceptions.RuntimeIOException;
Expand Down Expand Up @@ -113,6 +114,8 @@ private static <D> DataFileWriter<D> newAvroWriter(
writer.setMeta(entry.getKey(), entry.getValue());
}

writer.setEncoder(b -> EncoderFactory.get().blockingDirectBinaryEncoder(b, null));

@namrathamyske namrathamyske Oct 30, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also do it here:

BinaryEncoder encoder = EncoderFactory.get().directBinaryEncoder(stream, ENCODER.get());
and
BinaryEncoder encoder = EncoderFactory.get().binaryEncoder(out, null);


return writer.create(schema, stream);
}
}