Jefffrey commented on code in PR #5616:
URL: https://github.com/apache/arrow-datafusion/pull/5616#discussion_r1137610388


##########
datafusion/common/src/table_reference.rs:
##########
@@ -189,7 +234,8 @@ impl<'a> TableReference<'a> {
         }
     }
 
-    /// Converts directly into an [`OwnedTableReference`]
+    /// Converts directly into an [`OwnedTableReference`] by copying

Review Comment:
   copying -> cloning maybe?
   
   not sure how explicit need to be about cloning in documentation



##########
datafusion/common/src/table_reference.rs:
##########
@@ -80,14 +121,18 @@ impl std::fmt::Display for TableReference<'_> {
 }
 
 impl<'a> TableReference<'a> {
-    /// Convenience method for creating a `Bare` variant of `TableReference`
+    /// Convenience method for creating a [`TableReference::Bare`]
+    ///
+    /// As described on [`TableReference`] this does *NO* parsing at
+    /// all -- so "Foo.Bar" stays as a reference to the table named
+    /// "Foo.Bar" (rather than "foo"."bar")
     pub fn bare(table: impl Into<Cow<'a, str>>) -> TableReference<'a> {
         TableReference::Bare {
             table: table.into(),
         }
     }
 
-    /// Convenience method for creating a `Partial` variant of `TableReference`
+    /// Convenience method for creating a [`TableReference::Partial`]

Review Comment:
   maybe also mention these do no parsing either for their parts? ditto for full



##########
datafusion/common/src/table_reference.rs:
##########
@@ -260,7 +310,7 @@ impl<'a> TableReference<'a> {
     }
 }
 
-/// Parse a `String` into a OwnedTableReference
+/// Parse a `String` into a OwnedTableReference as a SQL identifier.

Review Comment:
   `... as a multipart SQL identifier.`



##########
datafusion/common/src/table_reference.rs:
##########
@@ -231,14 +287,8 @@ impl<'a> TableReference<'a> {
         }
     }
 
-    /// Forms a [`TableReference`] by attempting to parse `s` as a multipart 
identifier,
-    /// failing that then taking the entire unnormalized input as the 
identifier itself.
-    ///
-    /// Will normalize (convert to lowercase) any unquoted identifiers.
-    ///
-    /// e.g. `Foo` will be parsed as `foo`, and `"Foo"".bar"` will be parsed as
-    /// `Foo".bar` (note the preserved case and requiring two double quotes to 
represent
-    /// a single double quote in the identifier)
+    /// Forms a [`TableReference`] by parsing `s` as a multipart
+    /// identifier. See docs on [`TableReference`] for more details.

Review Comment:
   `... as a multipart SQL identifier.`



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

Reply via email to