hlteoh37 commented on code in PR #21798:
URL: https://github.com/apache/flink/pull/21798#discussion_r1099391455


##########
flink-formats/flink-avro-glue-schema-registry/src/main/java/org/apache/flink/formats/avro/glue/schema/registry/GlueSchemaRegistryInputStreamDeserializer.java:
##########
@@ -73,12 +72,10 @@ public Schema getSchemaAndDeserializedStream(InputStream 
in) throws IOException
         in.read(inputBytes);
         in.reset();
 
-        MutableByteArrayInputStream mutableByteArrayInputStream = 
(MutableByteArrayInputStream) in;
         String schemaDefinition =
                 
glueSchemaRegistryDeserializationFacade.getSchemaDefinition(inputBytes);
         byte[] deserializedBytes =
                 
glueSchemaRegistryDeserializationFacade.getActualData(inputBytes);
-        mutableByteArrayInputStream.setBuffer(deserializedBytes);

Review Comment:
   Yes, as far as I can tell as well... it is not doing anything, since the 
mutableByteArrayInputStream is not read further down the callchain... Compared 
with the implementations of `SchemaCoder.readSchema()` in 
`ConfluentSchemaRegistryCoder` as well. The buffer doesn't seem to be reset 
there, nor is it used after. 



-- 
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]

Reply via email to