-
Notifications
You must be signed in to change notification settings - Fork 485
feat(binder): implement AvroValueAdapter and RecordBinder for Avro to Iceberg conversion #2744
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
16aabe8
to
30abf31
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 implements a new Avro to Iceberg conversion mechanism using the adapter pattern for improved performance and flexibility. The implementation includes lazy-evaluation Record views that convert field values only when accessed, avoiding upfront conversion overhead.
Key changes include:
- Introduction of TypeAdapter interface and abstract implementation for type conversion
- RecordBinder that creates lazy-evaluation Record views from Avro GenericRecords
- AvroValueAdapter with Avro-specific type handling for Utf8, EnumSymbol, and Fixed types
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
TypeAdapter.java | Interface for converting values between schema systems |
AbstractTypeAdapter.java | Base implementation with common type conversion logic |
AvroValueAdapter.java | Avro-specific type adapter implementation |
RecordBinder.java | Factory creating lazy-evaluation Record views |
AvroRecordBinderTest.java | Comprehensive test suite for all data type conversions |
PerformanceComparisonTest.java | Performance comparison between RecordBinder and Visitor |
PerformanceProfilingTest.java | Detailed profiling test for performance analysis |
core/src/test/java/kafka/automq/table/binder/PerformanceProfilingTest.java
Show resolved
Hide resolved
core/src/test/java/kafka/automq/table/binder/PerformanceProfilingTest.java
Show resolved
Hide resolved
core/src/test/java/kafka/automq/table/binder/PerformanceProfilingTest.java
Show resolved
Hide resolved
… Iceberg conversion
ac5981a
to
76fbbb6
Compare
#2743