peasee commented on code in PR #13405:
URL: https://github.com/apache/datafusion/pull/13405#discussion_r1845688654


##########
datafusion/sql/src/unparser/ast.rs:
##########
@@ -360,6 +455,23 @@ impl RelationBuilder {
     pub fn has_relation(&self) -> bool {
         self.relation.is_some()
     }
+    pub fn get_name(&self) -> Option<&ast::ObjectName> {
+        match self.relation {
+            Some(TableFactorBuilder::Table(ref value)) => value.name.as_ref(),
+            _ => None,
+        }
+    }
+    pub fn get_alias(&self) -> Option<String> {

Review Comment:
   It looks like `Ident` doesn't implement anything that would return a `&str`, 
so it needs a `String` intermediary. I'm also not sure what copies you're 
referring too, I don't make any copies of the values from 
`collect_valid_idents`? The return from `get_alias` also isn't cloned, and is 
taken ownership of by `collect_valid_idents`.



-- 
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]

Reply via email to