Skip to content

Commit

Permalink
[Improve] update kafka avro e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
liunaijie committed Dec 27, 2023
1 parent 04ed0db commit da7eec5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -55,7 +55,7 @@ public DatumReader<GenericRecord> getReader() {
}

private DatumReader<GenericRecord> createReader() {
GenericDatumReader<GenericRecord> datumReader = new GenericDatumReader<>(schema, schema);
SpecificDatumReader<GenericRecord> datumReader = new SpecificDatumReader<>(schema);
datumReader.getData().addLogicalTypeConversion(new Conversions.DecimalConversion());
datumReader.getData().addLogicalTypeConversion(new TimeConversions.DateConversion());
datumReader
Expand Down

0 comments on commit da7eec5

Please sign in to comment.