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

Include more datatypes for avro schema #811

Merged
merged 5 commits into from
Sep 13, 2024
Merged

Include more datatypes for avro schema #811

merged 5 commits into from
Sep 13, 2024

Conversation

henneberger
Copy link
Contributor

Add more timestamps, code cleanup

Signed-off-by: Daniel Henneberger <git@danielhenneberger.com>
Copy link
Contributor

@mbroecheler mbroecheler left a comment

Choose a reason for hiding this comment

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

one minor code suggestion

if (typeCache.containsKey(schema)) {
throw errors.exception(ErrorCode.SCHEMA_ERROR, "Recursive schema's not yet supported: %s", path);
}

switch (schema.getType()) {
case UNION:
Copy link
Contributor

Choose a reason for hiding this comment

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

To make the code a bit cleaner and DRYer, use the new java switch expression, i.e. something like

}
typeCache.add(schema,relType);
return relType;

Signed-off-by: Daniel Henneberger <git@danielhenneberger.com>
Signed-off-by: Daniel Henneberger <git@danielhenneberger.com>
Signed-off-by: Daniel Henneberger <git@danielhenneberger.com>
Signed-off-by: Daniel Henneberger <git@danielhenneberger.com>
@henneberger henneberger merged commit 53be6ed into main Sep 13, 2024
1 check passed
@henneberger henneberger deleted the avro branch September 13, 2024 21:57
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