-
Notifications
You must be signed in to change notification settings - Fork 497
feat: enhance schema handling and optimize record processing #2855
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
Conversation
0840453
to
9ab1820
Compare
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.
Pull Request Overview
This PR enhances schema handling by implementing caching mechanisms and optimizes record processing by reducing object allocations and improving performance. The changes introduce better error handling for schema registry issues and include comprehensive testing for edge cases.
Key Changes
- Added schema caching to reduce parsing overhead in converters and transforms
- Optimized record assembly with view-based implementation to minimize allocations
- Enhanced error handling with specific exception types for different failure scenarios
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
RecordAssemblerTest.java | New comprehensive test suite covering schema wrapping and record assembly functionality |
DefaultRecordProcessorTest.java | Added extensive test coverage for error scenarios, caching behavior, and transform processing |
AvroRecordBinderTest.java | Enhanced string handling tests with normalization utilities for better type compatibility |
DebeziumUnwrapTransform.java | Implemented schema caching and optimized record building with GenericData.Record |
StringConverter.java | Replaced hashCode with schema fingerprint for consistent identity generation |
RawConverter.java | Replaced hashCode with schema fingerprint for consistent identity generation |
RecordAssembler.java | Major refactor with caching, view-based records, and optional schema handling |
DefaultRecordProcessor.java | Added schema caching, optimized header processing, and improved error classification |
FieldMetric.java | Enhanced to handle Utf8 types efficiently with byte-length calculations |
RecordBinder.java | Updated to accept CharSequence for broader string type compatibility |
AvroValueAdapter.java | Optimized Utf8 handling by avoiding unnecessary toString() conversions |
Comments suppressed due to low confidence (1)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
* fix(converter): improve schema identity generation and optimize RecordAssembler * feat: enhance schema handling and optimize record processing * feat: improve schema field handling and normalize record values * feat: enhance schema generation and improve handling of optional fields * fix: reorder import statements for better organization
…2862) * fix(converter): improve schema identity generation and optimize RecordAssembler * feat: enhance schema handling and optimize record processing * feat: improve schema field handling and normalize record values * feat: enhance schema generation and improve handling of optional fields * fix: reorder import statements for better organization
No description provided.