Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
mwylde committed Jan 13, 2025
1 parent 1290333 commit 6bba57e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 5 additions & 7 deletions crates/arroyo-connectors/src/redis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,11 @@ impl Connector for RedisConnector {
"lookup" => {
// for look-up tables, we require that there's a primary key metadata field
for f in &schema.fields {
if schema.primary_keys.contains(&f.field_name) {
if f.metadata_key.as_ref().map(|k| k != "key").unwrap_or(true) {
bail!(
"Redis lookup tables must have a PRIMARY KEY field defined as \
`field_name TEXT GENERATED ALWAYS AS (metadata('key')) STORED`"
);
}
if schema.primary_keys.contains(&f.field_name) && f.metadata_key.as_ref().map(|k| k != "key").unwrap_or(true) {
bail!(
"Redis lookup tables must have a PRIMARY KEY field defined as \
`field_name TEXT GENERATED ALWAYS AS (metadata('key')) STORED`"
);
}
}

Expand Down
1 change: 1 addition & 0 deletions crates/arroyo-rpc/src/api_types/connections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ pub struct ConnectionSchema {
}

impl ConnectionSchema {
#[allow(clippy::too_many_arguments)]
pub fn try_new(
format: Option<Format>,
bad_data: Option<BadData>,
Expand Down

0 comments on commit 6bba57e

Please sign in to comment.