maropu commented on a change in pull request #29087:
URL: https://github.com/apache/spark/pull/29087#discussion_r553021104



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -659,12 +670,23 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with 
SQLConfHelper with Logg
         AttributeReference("value", StringType)()), true)
     }
 
-    // Create the transform.
+    val plan = visitCommonSelectQueryClausePlan(
+      relation,
+      lateralView,
+      transformClause.namedExpressionSeq,
+      whereClause,
+      aggregationClause,
+      havingClause,
+      windowClause,
+      isDistinct = false)
+
+    // Create the transform, here we pass UnresolvedStart as ScriptTransform's 
input.
+    // In analyzer after child plan is resolved, we resolve UnresolvedStart as 
child's output.
     ScriptTransformation(
-      expressions,
+      Seq(UnresolvedStar(None)),

Review comment:
       Nice. Just removing the param causes a big diff? I'd like to remove[ the 
current the weird Analyzer code 
](https://github.com/apache/spark/pull/29087/files#diff-ed19f376a63eba52eea59ca71f3355d4495fad4fad4db9a3324aade0d4986a47R1520-R1526)
 to handle the unresolved star in this PR though.




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

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