-
Notifications
You must be signed in to change notification settings - Fork 487
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
Fix out of memory bug #1270 #1286
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1286 +/- ##
==========================================
+ Coverage 84.41% 84.48% +0.06%
==========================================
Files 549 561 +12
Lines 61952 62774 +822
==========================================
+ Hits 52295 53032 +737
- Misses 9657 9742 +85 ☔ View full report in Codecov by Sentry. |
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.
LGTM! Just some minor comments related to typos 👍
struct DefaultDeserializer { | ||
/// The originator field name (the top level missing field name) | ||
originator_field_name: Option<String>, | ||
} |
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.
I suggest we consider renaming that struct at some point. Returning the default value isn't accurate for all deserialization types. The current name primarily defines 'how' it works, but it doesn't precisely convey 'what' task is performed by deserializing default values. My understanding is that the objective is to extract an empty data structure tree, creating any 'container' node with default values, while the leaf node should not undergo deserialization (deserialize_struct). Am I correct?
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.
Yes, it has become hybrid now. Initially, I was thinking it would be ok to fill-in with default values for all unmatched "tree" branches. Although it works, it leads to odd outcomes (module with default values) if the field name mismatched. So here instead I opted to throw an error (field name + type).
I am open for a better name. We have some time to think since this is a private deserializer struct.
Pull Request Template
Checklist
run-checks all
script has been executed.Related Issues/PRs
#1270
Changes
Testing
Existing unit tests are passing and new test was added.