cloud-fan commented on code in PR #48664:
URL: https://github.com/apache/spark/pull/48664#discussion_r1837471917


##########
sql/api/src/main/scala/org/apache/spark/sql/Column.scala:
##########
@@ -1382,6 +1382,21 @@ class Column(val node: ColumnNode) extends Logging {
    */
   def over(): Column = over(Window.spec)
 
+  /**
+   * Marks this column reference as an outer reference for subqueries.
+   *
+   * @group subquery
+   * @since 4.0.0
+   */
+  def outer(): Column = withOrigin {
+    node match {
+      case attr: UnresolvedAttribute if !attr.isMetadataColumn =>
+        Column(LazyOuterReference(attr.nameParts, attr.planId))
+      case _ =>
+        throw new IllegalArgumentException(

Review Comment:
   we should throw an internal error.



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

Reply via email to