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


##########
datafusion/sql/src/planner.rs:
##########
@@ -416,19 +416,15 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
         planner_context: &mut PlannerContext,
         outer_query_schema: &DFSchema,
     ) -> Result<LogicalPlan> {
-        self.query_to_plan_with_alias(
-            query,
-            None,
-            planner_context,
-            Some(outer_query_schema),
-        )
+        self.query_to_plan_with_schema(query, planner_context, 
Some(outer_query_schema))
     }
 
-    /// Generate a logic plan from an SQL query with optional alias
-    pub fn query_to_plan_with_alias(
+    /// Generate a logic plan from an SQL query.
+    /// It's implementation of `subquery_to_plan` and `query_to_plan`.
+    /// It shouldn't be invoked directly.
+    fn query_to_plan_with_schema(
         &self,
         query: Query,
-        alias: Option<String>,
         planner_context: &mut PlannerContext,
         outer_query_schema: Option<&DFSchema>,

Review Comment:
   👍 



##########
datafusion/sql/src/planner.rs:
##########
@@ -416,19 +416,15 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
         planner_context: &mut PlannerContext,
         outer_query_schema: &DFSchema,
     ) -> Result<LogicalPlan> {
-        self.query_to_plan_with_alias(
-            query,
-            None,
-            planner_context,
-            Some(outer_query_schema),
-        )
+        self.query_to_plan_with_schema(query, planner_context, 
Some(outer_query_schema))
     }
 
-    /// Generate a logic plan from an SQL query with optional alias
-    pub fn query_to_plan_with_alias(
+    /// Generate a logic plan from an SQL query.

Review Comment:
   This API makes a lot of sense -- thank you @jackwener 



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