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

Add support for logical types #21

Merged
merged 2 commits into from
Aug 29, 2016
Merged

Add support for logical types #21

merged 2 commits into from
Aug 29, 2016

Conversation

tjwp
Copy link
Collaborator

@tjwp tjwp commented Aug 29, 2016

The changes here to support the three logical types that make sense with builtin Ruby types were relatively straightforward. But the actual use of these logical types found some issues with the proposed changes to the official avro gem: apache/avro#116. This required a new release of our fork.

Prime: @jturkel

}.freeze

def self.value_class(logical_type)
LOGICAL_TYPE_MAP.fetch(logical_type, nil)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could probably just be LOGICAL_TYPE_MAP[logical_type] since you're falling back to nil anyway.

Copy link
Collaborator Author

@tjwp tjwp Aug 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason when I wrote this this felt like it captured more explicitly that its okay for a logical type to not be present, and we're expecting to handle nil. But I don't feel that strongly about it.

@jturkel
Copy link
Member

jturkel commented Aug 29, 2016

A few minor comments. :shipit:

@tjwp tjwp merged commit 442181e into master Aug 29, 2016
@tjwp tjwp deleted the feature/logical_types branch August 29, 2016 15:27
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.

2 participants