cloud-fan commented on code in PR #39133:
URL: https://github.com/apache/spark/pull/39133#discussion_r1058032279


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/unresolved.scala:
##########
@@ -136,6 +136,30 @@ object UnresolvedTableValuedFunction {
   }
 }
 
+/**
+ * A table-valued function with output column aliases. The table function has 
been
+ * looked up and turned into a logical plan.
+ *
+ * @param name qualified name of the table-valued function
+ * @param child logical plan of the table-valued function
+ * @param outputNames alias names of function output columns. The analyzer 
adds [[Project]]
+ *                    to rename the output columns.
+ */
+case class TableValuedFunctionWithAlias(

Review Comment:
   I think the confusing part is, `UnresolvedTableValuedFunction` contains 
alias as well. If we add a new node `UnresolvedTVFAlias`, this could be clearer:
   - parser creates `UnresolvedTVFAlias(UnresolvedTableValuedFunction)`
   - analyzer turns `UnresolvedTableValuedFunction` into resolved TVF plan
   - analyzer turns `UnresolvedTVFAlias` into `Project` if its child is 
resolved.



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