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

Decimal Support in avro format #316

Open
maver1ck opened this issue Apr 8, 2021 · 4 comments
Open

Decimal Support in avro format #316

maver1ck opened this issue Apr 8, 2021 · 4 comments

Comments

@maver1ck
Copy link

maver1ck commented Apr 8, 2021

Is it possible to add Decimal support in Avro format to kafkacat ?
Right now decimals are displayed as byte arrays.

@edenhill
Copy link
Owner

edenhill commented Apr 8, 2021

We rely on avro-c to generate JSON from Avro, maybe Avro-C 1.8.x doesn't support decimal?

@krisajenkins
Copy link

I did a bit of research on this (because I'd like decimal support too).

Avro-C doesn't support decimal because it doesn't support logical types. There's a PR open for it but it seems to be stuck in PR purgatory.

@edenhill
Copy link
Owner

edenhill commented Jul 6, 2021

Thanks @krisajenkins !

@SahilKang
Copy link

I opened apache/avro#2891 as an alternative to add decimal support to avro-c

with that said though, I think there's a small misunderstanding why kcat currently displays decimal objects as a series of bytes: it's not because avro-c lacks decimal support, it's because the json representation you're seeing is actually specified that way in the spec

so even after avro-c adds decimal support, we'll probably have to add some logic here in kcat to print decimals more readably...that should be relatively straightforward to do though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants