Skip to content

Conversation

@ibzib
Copy link

@ibzib ibzib commented Nov 11, 2020

…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:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

Post-Commit Tests Status (on master branch)

Lang SDK Dataflow Flink Samza Spark Twister2
Go Build Status --- Build Status --- Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status ---
XLang Build Status --- Build Status --- Build Status ---

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status --- --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

Copy link
Contributor

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.

@kennknowles kennknowles requested a review from apilloud November 13, 2020 00:10
Copy link
Member

@apilloud apilloud left a 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

Copy link
Member

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?

Copy link
Author

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.)

Copy link
Member

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?

Copy link
Author

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.
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.

3 participants