-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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 TypeParameters to SqlInvokedFunction #18581
Add TypeParameters to SqlInvokedFunction #18581
Conversation
059faa3
to
e537f27
Compare
@sviscaino The idea is to do the Annotation parser change in a simple PR by itself and then you can do the array functions separately. |
e537f27
to
faa36b2
Compare
Ok, done - I will make a separate PR to generalize the existing SQL functions after this one is merged. I updated the PR title and description. |
27da516
to
6fec300
Compare
Thank you! |
Also please add a unit test for this |
6fec300
to
7d0cda9
Compare
done (there were no unit tests for SqlInvokedScalarFromAnnotationsParser so I added them) |
7d0cda9
to
59ecdc9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding the unit test!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kaikalur feel free to merge the PR once the comments have been addressed
...ain/src/test/java/com/facebook/presto/operator/TestAnnotationEngineForSqlInvokedScalars.java
Outdated
Show resolved
Hide resolved
...ain/src/test/java/com/facebook/presto/operator/TestAnnotationEngineForSqlInvokedScalars.java
Outdated
Show resolved
Hide resolved
...ain/src/test/java/com/facebook/presto/operator/TestAnnotationEngineForSqlInvokedScalars.java
Outdated
Show resolved
Hide resolved
59ecdc9
to
ce6dc8c
Compare
The current parser SqlInvokedScalarFromAnnotationsParser.java does not pass along TypeParameter annotations to the function signature.
This PR fixes this gap so we can write SqlInvokedFunctions with type parameters.
Test plan -
mvn test -Dtest=TestAnnotationEngineForSqlInvokedScalars test