@Override
    public RowData deserialize(@Nullable byte[] message) throws IOException {
        if (message == null) {
            return null;
        }
        try {
            GenericRecord deserialize = nestedSchema.deserialize(message);
            return (RowData) runtimeConverter.convert(deserialize);
        } catch (Exception e) {
            throw new IOException("Failed to deserialize Avro record.", e);
        }
    }
@Test
    void testTimestampTypeNewMapping() throws Exception {
        final Tuple4<Class<? extends SpecificRecord>, SpecificRecord, GenericRecord, Row> testData =
                AvroTestUtils.getTimestampTestData();

        SpecificDatumWriter<Timestamps> datumWriter = new SpecificDatumWriter<>(Timestamps.class);
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        Encoder encoder = EncoderFactory.get().binaryEncoder(byteArrayOutputStream, null);
        datumWriter.write((Timestamps) testData.f1, encoder);
        encoder.flush();
        byte[] input = byteArrayOutputStream.toByteArray();

        DataType dataType =
                AvroSchemaConverter.convertToDataType(
                        SpecificData.get().getSchema(Timestamps.class).toString(), false);

        AvroRowDataSerializationSchema serializationSchema =
                createSerializationSchema(dataType, AvroEncoding.BINARY, false);
        AvroRowDataDeserializationSchema deserializationSchema =
                createDeserializationSchema(dataType, AvroEncoding.BINARY, false);

        RowData rowData = deserializationSchema.deserialize(input);
        byte[] output = serializationSchema.serialize(rowData);
        RowData rowData2 = deserializationSchema.deserialize(output);
        assertThat(rowData2).isEqualTo(rowData);

        assertThat(rowData.getTimestamp(2, 3).toLocalDateTime().toString())
                .isEqualTo("2014-03-01T12:12:12.321");
        assertThat(rowData.getTimestamp(3, 6).toLocalDateTime().toString())
                .isEqualTo("1970-01-01T00:02:03.456");
    }