-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[BEAM-10925] Create ZetaSQL-specific subclass of ScalarFunctionImpl t… #13309
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
Conversation
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.
for these ZETASQL_FUNCTION_GROUP_NAME, eventually I think we will migrate it off from createUdfOperator.
apilloud
left a comment
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.
I'm a little concerned about making createUdafOperator/createUdfOperator public. Otherwise LGTM
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.
nit: It seems like SqlAnalyzer.ZETASQL_FUNCTION_GROUP_NAME is the only thing ever passed to funGroup here and below. Should it really be an argument?
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.
The full implementation uses the group name to distinguish built-in functions from user-defined functions. (Whether that's a good idea or not is up for debate.)
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.
This (and createUdfOperator) is intended to be a (slightly hacky) helper function for implementing ZetaSQL operators via the UDF interface. Why do you need to make them public?
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.
In the original PR, I used createUdfOperator in ExpressionConverter, and createUdafOperator in AggregateScanConverter. So they can be package-private instead of public.
…hat knows which function group it belongs to. This will be important for differentiating ZetaSQL built-in functions from UDFs. Also resolves the nullability error in findMethod.
…hat knows which function group it belongs to.
This will be important for differentiating ZetaSQL built-in functions from UDFs.
Also resolves the nullability error in findMethod.
R: @amaliujia @kennknowles
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username).[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
Post-Commit Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.