alamb commented on code in PR #6022:
URL: https://github.com/apache/arrow-datafusion/pull/6022#discussion_r1167823373


##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -1304,20 +1304,20 @@ pub struct SubqueryAlias {
     /// The incoming logical plan
     pub input: Arc<LogicalPlan>,
     /// The alias for the input relation
-    pub alias: String,
+    pub alias: OwnedTableReference,
     /// The schema with qualified field names
     pub schema: DFSchemaRef,
 }
 
 impl SubqueryAlias {
-    pub fn try_new(plan: LogicalPlan, alias: impl Into<String>) -> 
Result<Self> {
+    pub fn try_new(
+        plan: LogicalPlan,
+        alias: impl Into<OwnedTableReference>,
+    ) -> Result<Self> {
         let alias = alias.into();
-        let table_ref = TableReference::bare(&alias);

Review Comment:
   👍 



##########
datafusion/expr/src/logical_plan/builder.rs:
##########
@@ -381,7 +381,7 @@ impl LogicalPlanBuilder {
     }
 
     /// Apply an alias
-    pub fn alias(self, alias: impl Into<String>) -> Result<Self> {
+    pub fn alias(self, alias: impl Into<OwnedTableReference>) -> Result<Self> {

Review Comment:
   👍  this change makes a lot of sense to me and is consistent with creating 
names of other relations (like `CreateExternalTable`)
   
   
https://docs.rs/datafusion-expr/22.0.0/datafusion_expr/logical_plan/struct.CreateExternalTable.html
   
   



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