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

Make UDFs public when added to schema provider #407

Merged
merged 1 commit into from
Nov 14, 2023
Merged

Conversation

jbeisen
Copy link
Collaborator

@jbeisen jbeisen commented Nov 13, 2023

Restore the previous logic of modifying the UDF syntax tree at the time
we add it to the schema provider.

Also use the schema provider in the check UDF flow. This removes some
redundant logic from the controller and improves the error messages that
now appear as UDF validation errors with their respective UDF rather
than as just as query errors.

@jbeisen jbeisen force-pushed the udfs-public branch 3 times, most recently from ceeff3d to 54aa8d6 Compare November 14, 2023 01:11
@jbeisen jbeisen changed the title Make UDFs public when written to build dir Make UDFs public when added to schema provider Nov 14, 2023
@jbeisen jbeisen force-pushed the udfs-public branch 2 times, most recently from 585b23a to cc35c80 Compare November 14, 2023 18:00
Comment on lines -483 to -490
_ => {
return Ok(Response::new(CheckUdfsResp {
errors: vec![
"Only functions and use statements are allowed in UDFs".to_string()
],
udf_name: None,
}))
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As far as I know we don't actually need this check any more, so I didn't implement it in the ArroyoSchemaProvider.

Restore the previous logic of modifying the UDF syntax tree at the time
we add it to the schema provider.

Also use the schema provider in the check UDF flow. This removes some
redundant logic from the controller and improves the error messages that
now appear as UDF validation errors with their respective UDF rather
than as just as query errors.
@jbeisen jbeisen merged commit 571da91 into master Nov 14, 2023
8 checks passed
@jbeisen jbeisen deleted the udfs-public branch November 14, 2023 19:31
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.

2 participants