callum-ryan commented on code in PR #610:
URL: https://github.com/apache/iceberg-rust/pull/610#discussion_r1761619195
##########
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:
This is a good point, thank you, fixed.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]