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

Morethan254fields #189

Closed
wants to merge 2 commits into from
Closed

Conversation

steve-e
Copy link

@steve-e steve-e commented Dec 15, 2023

Generate specific avro parsers for schemas with more than 254 fields. The normal way avro schemas are handled is to create a case class with a var parameter for each field. A get method is also generated with a code bloc to convert each numbered field to an AnyRef. This function can exceed the JVM limit of 65536 bytes of there are many fields particularly if some are fixed types

  • JVM has a hard limit on parameter lists of 254
  • workaround by having public member vars instead
  • JVM has a method size limit of 65536 bytes
  • workaround this by having a function per field and delegate to that in the match expression

@steve-e
Copy link
Author

steve-e commented Dec 15, 2023

Just for reference

@julianpeeters
Copy link
Owner

awesome, thank you

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

Successfully merging this pull request may close these issues.

2 participants