codelipenghui edited a comment on issue #9698:
URL: https://github.com/apache/pulsar/issues/9698#issuecomment-794654228


   @eolivelli I think we can use `Record.getSchema().getSchemaInfo().getType()` 
to get the schema type, and then convert.
   
   ```
   If (Schema.INT64 == Record.getSchema().getSchemaInfo().getType()) {
        Long value = ((LongSchema)Record.getSchema()).decode(bytes);
   }
   ```


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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to