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

[SQL] Support for user-defined functions written in SQL #1714

Merged
merged 2 commits into from
May 7, 2024
Merged

Conversation

mihaibudiu
Copy link
Collaborator

Is this a user-visible change (yes/no): yes

Fixes #1135

This should always work, and doesn't require support from the pipeline manager.
Here is an example from the tests:

                CREATE FUNCTION contains_number(str VARCHAR NOT NULL, value INTEGER)
                RETURNS BOOLEAN NOT NULL
                AS (str LIKE ('%' || COALESCE(CAST(value AS VARCHAR), 'NULL') || '%'));

Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
@lalithsuresh
Copy link
Collaborator

Can the function run queries?

@mihaibudiu
Copy link
Collaborator Author

These have to be pure expressions. Table functions maybe later

Signed-off-by: Mihai Budiu <mbudiu@gmail.com>
@mihaibudiu mihaibudiu merged commit 70d3948 into main May 7, 2024
5 checks passed
@mihaibudiu mihaibudiu deleted the issue1135 branch May 7, 2024 18:30
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.

[SQL] Support SQL User Defined Functions
2 participants