vladimirg-db commented on code in PR #50285: URL: https://github.com/apache/spark/pull/50285#discussion_r2036696811
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/subquery.scala: ########## @@ -474,21 +492,32 @@ case class UnresolvedTableArgPlanId( case class LateralSubquery( plan: LogicalPlan, outerAttrs: Seq[Expression] = Seq.empty, + nestedOuterAttrs: Seq[Expression] = Seq.empty, exprId: ExprId = NamedExpression.newExprId, joinCond: Seq[Expression] = Seq.empty, hint: Option[HintInfo] = None) - extends SubqueryExpression(plan, outerAttrs, exprId, joinCond, hint) with Unevaluable { + extends SubqueryExpression( + plan, outerAttrs, nestedOuterAttrs, exprId, joinCond, hint) with Unevaluable { override def dataType: DataType = plan.output.toStructType Review Comment: It's not ideal that methods are so tightly packed. It would be great to add some newlines. ########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/DynamicPruning.scala: ########## @@ -67,6 +67,14 @@ case class DynamicPruningSubquery( copy() } + override def withNewNestedOuterAttrs( + nestedOuterAttrs: Seq[Expression] + ): DynamicPruningSubquery = { + // DynamicPruningSubquery should not have nested outer attrs + assert(nestedOuterAttrs.isEmpty) Review Comment: I wonder if it's better to throw a user-facing message or at least `SparkException.internalError`? -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org