-
Notifications
You must be signed in to change notification settings - Fork 120
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
Split up large schemas for AvroGenerateSpecific #168
Conversation
lmao, good stuff. |
Does your PR fix the issue for you? If so, I'm happy to publish to cover your use case. I slapped
|
That's my bad, I only checked that the companion object compiled fine. I should have remembered the parameter length limit, it's not actually a problem with our large schemas because they're nested. I can't actually bring one in here so I attempted to generate one. I'll figure it out. |
Hi @julianpeeters
(By the way, biguser.avsc has 251 fields, so that is within the JVM limit) The way my colleague worked around this was to hand edit the generated file to move most of the fields from the parameter list to be fields declared in the class. This works for our use case. I can try and create a PR to handle this issue, by generating a class with only a default no arg constructor. This could be the only behaviour for parameter lists longer than 254. But perhaps you have other ideas on how to handle this? |
Glad you found a workaround, @steve-e, and thanks for sharing it. However, I must decline your kind offer, due to maintenance reasons. |
Hi @julianpeeters You may be interested in the changes I have made so far, which I have put in a draft and closed PR to make it easier for you and others to view. This PR solves the issues we have. |
This fixes #167, which is about the
schema$
val that is added to the companion object of the generated case classes for Specific record types.The bummer is that the testing paradigm in place here uses example files and in order to test this you obviously need a super long schema and thus a super long example file corresponding to it. I considered reworking some of these tests to generate the schema file and then check that the files compile but that seemed overkill. The downside is that I've now added 28k lines of testing for very niche functionality.