You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "petermnhull (via GitHub)" <gi...@apache.org> on 2024/02/10 14:19:01 UTC
[PR] Fix BytesSchema [pulsar-client-go]
petermnhull opened a new pull request, #1173:
URL: https://github.com/apache/pulsar-client-go/pull/1173
### Motivation
This fixes the BytesSchema by adding it into the switch-case in the NewBytes constructor, and adds a test showing that it can be used in a producer and consumer. Before the fix, the test fails due to the unrecognised schema in the constructor and the producer and consumer fail to encode the message.
The motivation is that BytesSchema appears to be intended as the default schema (e.g. see [here](https://github.com/petermnhull/pulsar-client-go/blob/master/pulsar/consumer_impl.go#L92) for the Consumer) instead of defining no schema at all, but this code-path is never hit as no Schemas have the NONE type.
I first started looking at this when using a TableView with a topic without a defined or consistent Schema, and I have a work in progress branch for that which will rely on this.
### Modifications
- Add BytesSchema type into constructor for NewSchema.
- Add test for BytesSchema usage.
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
*(Please pick either of the following options)*
This change added tests and can be verified as follows:
- Added test showing NewBytes fails without the accompanying fix.
### Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API: no
- The schema: yes, allows use of BytesSchema
- The default values of configurations: no
- The wire protocol: no
### Documentation
- Does this pull request introduce a new feature? _no_
- If yes, how is the feature documented? _not applicable_
- If a feature is not applicable for documentation, explain why? _small fix, equivalent functionality also has no documentation_
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix BytesSchema [pulsar-client-go]
Posted by "RobertIndie (via GitHub)" <gi...@apache.org>.
RobertIndie merged PR #1173:
URL: https://github.com/apache/pulsar-client-go/pull/1173
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org