-
Notifications
You must be signed in to change notification settings - Fork 520
fix(binder): enhance RecordBinder to support TIMESTAMP and TIME types in union handling #2981
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
…ypes in union handling
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 refactors test code to improve test coverage and maintainability by introducing helper methods for comprehensive round-trip testing of Avro-to-Iceberg conversions, and fixes a bug in handling optional timestamp and time fields.
- Introduced
assertFieldRoundTripshelper method to test both direct and optional (union with null) field conversions - Added support for resolving union types in TIMESTAMP and TIME fields in RecordBinder
- Updated field count expectations to account for optional field handling
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| AvroRecordBinderTest.java | Refactored test methods to use assertFieldRoundTrips helper for comprehensive testing of both direct and optional fields; added new test for union field counting; updated field count assertions |
| RecordBinder.java | Extended union resolution logic to include TIMESTAMP and TIME types alongside existing MAP and LIST types |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ypes in union handling (#2981) * feat(timestamp): enhance RecordBinder to support TIMESTAMP and TIME types in union handling * test(avro): add missing import for AvroRecordBinderTest
Related to #2979