MaxGekk commented on code in PR #38576:
URL: https://github.com/apache/spark/pull/38576#discussion_r1026031578
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala:
##########
@@ -1059,10 +1060,16 @@ trait CheckAnalysis extends PredicateHelper with
LookupCatalog with QueryErrorsB
def failOnInvalidOuterReference(p: LogicalPlan): Unit = {
p.expressions.foreach(checkMixedReferencesInsideAggregateExpr)
if (!canHostOuter(p) && p.expressions.exists(containsOuter)) {
+ val exprs = new ListBuffer[String]()
+ for (expr <- p.expressions) {
Review Comment:
This can be simpler using `filter` instead of `exists` and `for`
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala:
##########
@@ -1059,10 +1060,16 @@ trait CheckAnalysis extends PredicateHelper with
LookupCatalog with QueryErrorsB
def failOnInvalidOuterReference(p: LogicalPlan): Unit = {
p.expressions.foreach(checkMixedReferencesInsideAggregateExpr)
if (!canHostOuter(p) && p.expressions.exists(containsOuter)) {
+ val exprs = new ListBuffer[String]()
+ for (expr <- p.expressions) {
+ if (containsOuter(expr)) {
+ exprs += toPrettySQL(expr)
Review Comment:
Use `toSQLExpr`
--
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]