fallintoplace commented on code in PR #334:
URL: https://github.com/apache/paimon-rust/pull/334#discussion_r3273077609
##########
crates/paimon/src/catalog/mod.rs:
##########
@@ -76,6 +77,29 @@ impl Identifier {
}
}
+ /// Create an identifier from database and object name, validating both
names.
+ pub fn try_new(database: impl Into<String>, object: impl Into<String>) ->
Result<Self> {
+ let identifier = Self::new(database, object);
+ identifier.validate()?;
+ Ok(identifier)
+ }
+
+ /// Validate this identifier's database and object names.
+ pub fn validate(&self) -> Result<()> {
Review Comment:
Good point. I will implement this.
--
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]