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

Core support for enums, take #2 #15219

Merged
merged 4 commits into from
Sep 29, 2020

Conversation

daniel-ohayon
Copy link
Contributor

@daniel-ohayon daniel-ohayon commented Sep 23, 2020

Second attempt to merge #14728

This was previously reverted because of a performance regression detected in TypeSignature.parseTypeSignature

This regression is addressed in a newly added commit, which includes a benchmark.

Performance stats on BenchmarkTypeSignatureParsing are as follows on my machine:

parseRowTypeSignature
==================
* with enum parsing, unoptimized parsing: 600ms/op
* with enum parsing, optimized parsing: 2ms/op
* without enum parsing: 2ms/op

parseRowTypeSignatureWithEnums
==========================
* with enum parsing, optimized parsing: 2ms/op

@daniel-ohayon
Copy link
Contributor Author

daniel-ohayon commented Sep 24, 2020

@rongrong I also added another new commit to the stack: Move enum parametric types to presto-common
This is so that plugins don't need to depend on presto-main to provide enum types.

I could also blend these last 3 "fix" commits into the earlier commits but I figured that since the stack had already been merged into master and reverted, it might be clearer to leave the fixes as separate commits?

@rongrong
Copy link
Contributor

@rongrong I also added another new commit to the stack: Move enum parametric types to presto-common
This is so that plugins don't need to depend on presto-main to provide enum types.

I could also blend these last 3 "fix" commits into the earlier commits but I figured that since the stack had already been merged into master and reverted, it might be clearer to leave the fixes as separate commits?

We already reverted the previous commits so let's just try to go clean and make each commit as bug-free as possible. It's easier to review the changes this way, but when we are ready to merge, please merge the new commits with the original ones introducing the change.

Add an is-a constraint for type variables, so we can describe generic types of a certain kind.
@daniel-ohayon
Copy link
Contributor Author

OK, I combined the last 3 commits into the earlier ones (that includes your fix to the TreeRewriter)

@rongrong
Copy link
Contributor

@yingsu00 @caithagoras We fixed the regression and added a benchmark to test parseTypeSignature. What do you guys fill about this? Should we do a verifier test before merging or rely on the nightly and release verification? I guess I'm the next release oncall so might be alright to just merge now? 😂

Support common operators like `=` on enum types
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