allisonwang-db commented on a change in pull request #32787:
URL: https://github.com/apache/spark/pull/32787#discussion_r647164105



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala
##########
@@ -791,4 +791,28 @@ class AnalysisErrorSuite extends AnalysisTest {
       assertAnalysisError(plan, s"Correlated column is not allowed in 
predicate ($msg)" :: Nil)
     }
   }
+
+  test("SPARK-35618: Resolve star expressions in subquery") {

Review comment:
       Yes, currently only `Filter` can host outer references for correlated 
subqueries, and star expansion only happens when the node is either a `Project` 
or `Aggregate` (buildExpandedProjectList). It will be clearer with lateral 
subquery examples: 
   ```sql
   // t: [a, b]
   SELECT * FROM t, LATERAL (SELECT t.*)  // <--- t.* should be resolved as 
t.a, t.b
   ```
   




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