Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kafka json byte and char types #4414

Merged

Conversation

devinrsmith
Copy link
Member

byte consumption was incorrect; it was being deserialized as a text node with the first byte of that text being the result. Instead, it should be treated as a numeric node, and cast to byte. This matches how other numeric types are handled.

char production was incorrect; it was being serialized as an int node. Instead, it should be treated as a text node which matches the expectations of the existing deserialization logic. Additionally, we can extend char deserialization to work in the case where the node actually is a number.

Fixes #4384

byte consumption was incorrect; it was being deserialized as a text node with the first byte of that text being the result. Instead, it should be treated as a numeric node, and cast to byte. This matches how other numeric types are handled.

char production was incorrect; it was being serialized as an int node. Instead, it should be treated as a text node which matches the expectations of the existing deserialization logic. Additionally, we can extend char deserialization to work in the case where the node actually _is_ a number.

Fixes deephaven#4384
@devinrsmith
Copy link
Member Author

We don't have any kafka / json parsing tests. Unfortunately, they are very tightly coupled. My hope in the near future is to extract the json parsing logic from kafka so we can have appropriately scoped unit tests.

@devinrsmith devinrsmith merged commit 255a3fb into deephaven:main Aug 31, 2023
10 checks passed
@devinrsmith devinrsmith deleted the kafka-json-byte-and-char-fixes branch August 31, 2023 20:20
@github-actions github-actions bot locked and limited conversation to collaborators Aug 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kafka Ingester gets Byte / Char columns wrong
2 participants