-
Notifications
You must be signed in to change notification settings - Fork 60
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
Codegen : Custom decode method broken into subMethods #507
Conversation
"this." + replaceSingleDollarSignWithDouble(escapedFieldName), StringUtils.EMPTY_STRING)); | ||
|
||
while (fieldCounter < recordSchema.getFields().size()) { | ||
String chunkMethodName = "customDecodeIfChunk" + chunkCounter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - why call the method "customDecodeIfChunk0()" ?
as oposed to customDecodeChunk0() ? what does the "if" stand for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #507 +/- ##
============================================
+ Coverage 45.75% 45.83% +0.08%
- Complexity 4432 4440 +8
============================================
Files 398 398
Lines 28015 28041 +26
Branches 4619 4621 +2
============================================
+ Hits 12817 12852 +35
+ Misses 13640 13635 -5
+ Partials 1558 1554 -4
☔ View full report in Codecov by Sentry. |
* breaking custom decode into sub methods * updated block size of customDecode blocks to 25 * 1000 field record round-trip ser/deser UT
What
This change will break up generated customDecode method into small subMethods while keeping the functionality consistent.
Why
Since generated customDecode method can be large for larger schemas, it could exceed size limit 64k. Splitting method into smaller subMethods avoids it.
Issue: #257
Test
Added UT with a 1000 field record round trip ser/deserialization.
Errors out on current master