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

[BEAM-7274] optimize oneOf handling #10944

Merged
merged 2 commits into from
Feb 24, 2020

Conversation

reuvenlax
Copy link
Contributor

When codegen support was added to enable protocol buffer schemas, oneof fields were left out and handled via map lookups. This was because ByteBuddy does not provide an easy way to generate conditional code.

In this PR we use the underlying ASM framework to generate switch/case statements to handle oneofs, and remove the slower map-based code path.

Copy link
Contributor

@alexvanboxel alexvanboxel left a comment

Choose a reason for hiding this comment

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

They are semantically identical, so LGTM

@reuvenlax reuvenlax merged commit 2e0f431 into apache:master Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants