You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/03/10 00:34:59 UTC

[GitHub] [pulsar] codelipenghui edited a comment on issue #9698: Add support for strings with SCHEMA.AUTO_CONSUME

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:
users@infra.apache.org