Skip to content

Commit

Permalink
fix: Adjust error message for existence of table
Browse files Browse the repository at this point in the history
Signed-off-by: callum-ryan <[email protected]>
  • Loading branch information
callum-ryan committed Sep 16, 2024
1 parent 61598af commit 5894475
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
10 changes: 2 additions & 8 deletions crates/catalog/sql/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1543,10 +1543,7 @@ mod tests {
.await
.unwrap_err()
.to_string(),
format!(
"Unexpected => Cannot create table {:?}. Table already exists.",
&table_ident
)
format!("Unexpected => Table {:?} already exists.", &table_ident)
);
}

Expand Down Expand Up @@ -1704,10 +1701,7 @@ mod tests {
.await
.unwrap_err()
.to_string(),
format!(
"Unexpected => Cannot create table {:? }. Table already exists.",
&dst_table_ident
),
format!("Unexpected => Table {:?} already exists.", &dst_table_ident),
);
}
}
5 changes: 1 addition & 4 deletions crates/catalog/sql/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ pub fn no_such_table_err<T>(table_ident: &TableIdent) -> Result<T> {
pub fn table_already_exists_err<T>(table_ident: &TableIdent) -> Result<T> {
Err(Error::new(
ErrorKind::Unexpected,
format!(
"Cannot create table {:?}. Table already exists.",
table_ident
),
format!("Table {:?} already exists.", table_ident),
))
}

0 comments on commit 5894475

Please sign in to comment.