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

Lack of schema static compiler #22

Closed
hhkbp2 opened this issue Jul 22, 2015 · 6 comments
Closed

Lack of schema static compiler #22

hhkbp2 opened this issue Jul 22, 2015 · 6 comments

Comments

@hhkbp2
Copy link
Contributor

@hhkbp2 hhkbp2 commented Jul 22, 2015

Hi,

Is there any requirement or development plan for static compiler of avro schema? currently fields of record are accessed by type interface{}. Programmers need to remember its real type and do casting all around, which is somewhat cumbersome. If schema compiler is available, all record structs with schema-specified type should be decoded to be used, which would fix this problem.

@karrick karrick added the enhancement label Aug 13, 2015
@karrick

This comment has been minimized.

Copy link
Contributor

@karrick karrick commented Aug 13, 2015

There has been talk about creating a static compiler for complex record types. I haven't been able to find the time to look into it yet.

@tristanz

This comment has been minimized.

Copy link

@tristanz tristanz commented Aug 24, 2015

Not sure how much code could be reused but there is a codegenerator here: https://github.com/stealthly/go-avro/tree/master/codegen

I agree this would be really nice.

@karrick karrick added the help wanted label Apr 14, 2016
@actgardner

This comment has been minimized.

Copy link
Contributor

@actgardner actgardner commented Apr 17, 2016

I started work on a code generator here: http://github.com/alanctgardner/gogen-avro

It supports generating structs from a schema file and encoding them as Avro right now - decoding is coming soon. PRs and issues are welcome!

@cweaver1321

This comment has been minimized.

Copy link

@cweaver1321 cweaver1321 commented Apr 26, 2016

Hi,

The project I am working on currently needs a go parser for dynamically creating an avro schema codec and using it to encode avro encoded json. This is not possible with the current goavro implementation as we have nested records and there is not a Json decode option. I will be approaching this by using C++ avro and cgo.

Thank you

@karrick

This comment has been minimized.

Copy link
Contributor

@karrick karrick commented Sep 1, 2017

I am closing this issue, because while it would be great to have a static Avro schema compiler, it's not within the scope of this project, and there are alternatives, such as mentioned above by @alanctgardner.

@karrick karrick closed this Sep 1, 2017
@karrick

This comment has been minimized.

Copy link
Contributor

@karrick karrick commented Sep 1, 2017

@cweaver1321, I have updated this library to have full JSON Avro support.

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

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.