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

refactor(test): refactor sql udf test #14941

Merged
merged 7 commits into from
Feb 4, 2024
Merged

Conversation

xzhseh
Copy link
Contributor

@xzhseh xzhseh commented Feb 2, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

As titled, refactor the current sql udf test suite to five sections, to improve the readability & future maintainability.

See the updated test for details.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

Just a reminder of the naming convention of sql udf, now we will stick with: SQL udf with [unnamed / named] parameters, instead of the original [anonymous / named] sql udf. The documentation may be updated accordingly.
Reference: #14941 (comment).

Copy link
Member

@xxchan xxchan left a comment

Choose a reason for hiding this comment

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

Just some nits not strictly related with this reorg

# create materialized view foo_mv as select fib(100);

# Calling a non-existence function
statement error failed to conduct semantic check, please see if you are calling non-existence functions
Copy link
Member

Choose a reason for hiding this comment

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

non-existent

@@ -1,325 +1,346 @@
statement ok
SET RW_IMPLICIT_FLUSH TO true;

#############################################
# Basic tests for anonymous / named sql udf #
Copy link
Member

Choose a reason for hiding this comment

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

I think anonymous function means function without a name. usually a closure. Better to just call them functions with named parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think unnamed / named sql udf is a good choice then. 😄

Copy link
Member

Choose a reason for hiding this comment

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

"unnamed" is still "anonymous"'s synonyms.. Please try to avoid making up terms that may lead to confusion.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then let's just stick with "sql udf with [named / unnamed] parameters", which should be precise and clear in most contexts.

@xzhseh xzhseh enabled auto-merge February 2, 2024 17:15
@xzhseh xzhseh added this pull request to the merge queue Feb 4, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 4, 2024
@xzhseh xzhseh enabled auto-merge February 4, 2024 15:52
@xzhseh xzhseh added this pull request to the merge queue Feb 4, 2024
Merged via the queue into main with commit 4fcb67f Feb 4, 2024
31 of 32 checks passed
@xzhseh xzhseh deleted the xzhseh/sql-udf-test-refactor branch February 4, 2024 16:50
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