diff --git a/seatunnel-formats/seatunnel-format-avro/src/main/java/org/apache/seatunnel/format/avro/AvroToRowConverter.java b/seatunnel-formats/seatunnel-format-avro/src/main/java/org/apache/seatunnel/format/avro/AvroToRowConverter.java index e86c63cd859c..f249042dcfcb 100644 --- a/seatunnel-formats/seatunnel-format-avro/src/main/java/org/apache/seatunnel/format/avro/AvroToRowConverter.java +++ b/seatunnel-formats/seatunnel-format-avro/src/main/java/org/apache/seatunnel/format/avro/AvroToRowConverter.java @@ -28,9 +28,9 @@ import org.apache.avro.Conversions; import org.apache.avro.Schema; import org.apache.avro.data.TimeConversions; -import org.apache.avro.generic.GenericDatumReader; import org.apache.avro.generic.GenericRecord; import org.apache.avro.io.DatumReader; +import org.apache.avro.specific.SpecificDatumReader; import java.io.Serializable; import java.lang.reflect.Array; @@ -55,7 +55,7 @@ public DatumReader getReader() { } private DatumReader createReader() { - GenericDatumReader datumReader = new GenericDatumReader<>(schema, schema); + SpecificDatumReader datumReader = new SpecificDatumReader<>(schema); datumReader.getData().addLogicalTypeConversion(new Conversions.DecimalConversion()); datumReader.getData().addLogicalTypeConversion(new TimeConversions.DateConversion()); datumReader