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 field optional in REST API #250

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions arroyo-api/src/pipelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ pub async fn validate_pipeline(
parallelism: 1,
udfs: validate_pipeline_post
.udfs
.unwrap_or(vec![])
.into_iter()
.map(|u| CreateUdf {
language: 0,
Expand Down Expand Up @@ -389,6 +390,7 @@ pub async fn post_pipeline(
parallelism: pipeline_post.parallelism,
udfs: pipeline_post
.udfs
.unwrap_or(vec![])
.into_iter()
.map(|u| CreateUdf {
language: 0,
Expand Down
4 changes: 2 additions & 2 deletions arroyo-rpc/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ use utoipa::ToSchema;
#[serde(rename_all = "camelCase")]
pub struct ValidatePipelinePost {
pub query: String,
pub udfs: Vec<Udf>,
pub udfs: Option<Vec<Udf>>,
}

#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)]
#[serde(rename_all = "camelCase")]
pub struct PipelinePost {
pub name: String,
pub query: String,
pub udfs: Vec<Udf>,
pub udfs: Option<Vec<Udf>>,
pub preview: Option<bool>,
pub parallelism: u64,
}
Expand Down
2 changes: 1 addition & 1 deletion integ/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ pub async fn main() {
by hop(interval '2 seconds', interval '10 seconds')",
source_name
),
udfs: vec![],
udfs: None,
},
)
.await
Expand Down