agubichev commented on code in PR #42705:
URL: https://github.com/apache/spark/pull/42705#discussion_r1323346187
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/DecorrelateInnerQuerySuite.scala:
##########
@@ -59,6 +59,25 @@ class DecorrelateInnerQuerySuite extends PlanTest {
joinCond.zip(conditions).foreach(e => compareExpressions(e._1, e._2))
}
+ private def check(
+ outputPlan: LogicalPlan,
+ joinCond: Seq[Expression],
+ correctAnswer: LogicalPlan,
+ conditions: Seq[Expression]): Unit = {
+ assert(!hasOuterReferences(outputPlan))
Review Comment:
done
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala:
##########
@@ -1405,6 +1405,11 @@ trait CheckAnalysis extends PredicateHelper with
LookupCatalog with QueryErrorsB
failOnInvalidOuterReference(g)
checkPlan(g.child, aggregated, canContainOuter)
+ // Correlated subquery can have a LIMIT clause
+ case l@Limit(_, input) =>
Review Comment:
done
--
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]