AveryQi115 commented on code in PR #50285:
URL: https://github.com/apache/spark/pull/50285#discussion_r2052977353


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/FunctionTableSubqueryArgumentExpression.scala:
##########
@@ -86,11 +88,20 @@ case class FunctionTableSubqueryArgumentExpression(
   override def hint: Option[HintInfo] = None
   override def withNewHint(hint: Option[HintInfo]): 
FunctionTableSubqueryArgumentExpression =
     copy()
+  override def withNewNestedOuterAttrs(
+    nestedOuterAttrs: Seq[Expression]
+  ): FunctionTableSubqueryArgumentExpression = {
+    assert(nestedOuterAttrs.toSet.subsetOf(outerAttrs.toSet),
+      s"nestedOuterAttrs must be a subset of outerAttrs, " +
+        s"but got ${nestedOuterAttrs.mkString(", ")}")
+    copy(nestedOuterAttrs = nestedOuterAttrs)
+  }

Review Comment:
   I can't make this as a default implementation for SubqueryExpression as it 
calls copy, which is only valid for `case class` instead of `abstract class`.
   
   I can make the assertion into a util function 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.

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

Reply via email to