Skip to content
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

Update AvroWrapper to expose logical type readers and converters #19

Merged
merged 1 commit into from
May 23, 2023

Conversation

criccomini
Copy link
Owner

Update AvroWrapper to expose the logical type readers and converters as public fields, allowing external access and customization. The changes are as follows:

In AvroReader:

  • Changed the accessibility of the DEFAULT_LOGICAL_TYPE_READERS map from private to public.

In AvroWrapper:

  • Added the DEFAULT_LOGICAL_TYPE_CONVERTERS map as a public field.
  • Added the logicalTypeConverters field to store the logical type converters.
  • Updated the constructors to accept the logical type converters map.
  • Added the LogicalTypeConverter interface to define the conversion behavior.
  • Implemented default logical type converters for various Avro logical types.
  • Modified the coerceType method to utilize the logical type converters for typed conversions.
  • Updated the wrap method to use the logical type converters for wrapping logical type values.

These changes provide more flexibility and extensibility when working with Avro logical types in the AvroReader and AvroWrapper classes.

Update AvroWrapper to expose the logical type readers and converters as public
fields, allowing external access and customization. The changes are as follows:

In AvroReader:
- Changed the accessibility of the DEFAULT_LOGICAL_TYPE_READERS map from private
  to public.

In AvroWrapper:
- Added the DEFAULT_LOGICAL_TYPE_CONVERTERS map as a public field.
- Added the logicalTypeConverters field to store the logical type converters.
- Updated the constructors to accept the logical type converters map.
- Added the LogicalTypeConverter interface to define the conversion behavior.
- Implemented default logical type converters for various Avro logical types.
- Modified the coerceType method to utilize the logical type converters for typed
  conversions.
- Updated the wrap method to use the logical type converters for wrapping
  logical type values.

These changes provide more flexibility and extensibility when working with Avro
logical types in the AvroReader and AvroWrapper classes.
@criccomini criccomini merged commit 4c287bc into main May 23, 2023
@criccomini criccomini deleted the avro-infer-logical-types branch May 23, 2023 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant