kevinjqliu commented on code in PR #610: URL: https://github.com/apache/iceberg-rust/pull/610#discussion_r1759659001
########## crates/catalog/sql/src/error.rs: ########## @@ -32,3 +32,20 @@ pub fn no_such_namespace_err<T>(namespace: &NamespaceIdent) -> Result<T> { format!("No such namespace: {:?}", namespace), )) } + +pub fn no_such_table_err<T>(table_ident: &TableIdent) -> Result<T> { + Err(Error::new( + ErrorKind::Unexpected, + format!("No such table: {:?}", table_ident), + )) +} + +pub fn table_already_exists_err<T>(table_ident: &TableIdent) -> Result<T> { + Err(Error::new( + ErrorKind::Unexpected, + format!( + "Cannot create table {:?}. Table already exists.", Review Comment: nit: this error is used in other functions such as rename. ```suggestion "Table already exists: {:?}", ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org