From c91569e6f8a9bb2b2b4a70a17573fe10f76b07f0 Mon Sep 17 00:00:00 2001 From: CynicDog Date: Sat, 11 Jul 2026 20:58:23 +0900 Subject: [PATCH 1/2] [MINOR][PYTHON][DOCS] Add example to Column.outer docstring Column.outer had no worked example showing how it's used to build a correlated subquery, unlike the other Column methods in this file. --- python/pyspark/sql/column.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/python/pyspark/sql/column.py b/python/pyspark/sql/column.py index a38ed64eb700d..0ac71b19cd156 100644 --- a/python/pyspark/sql/column.py +++ b/python/pyspark/sql/column.py @@ -1578,6 +1578,24 @@ def outer(self) -> "Column": -------- pyspark.sql.dataframe.DataFrame.scalar pyspark.sql.dataframe.DataFrame.exists + + Examples + -------- + >>> from pyspark.sql import functions as sf + >>> employees = spark.createDataFrame( + ... [(1, "Alice", 5000, 101), (2, "Bob", 6000, 101), (3, "Charlie", 4500, 102)], + ... ["id", "name", "salary", "department_id"], + ... ) + >>> employees.alias("e1").where( + ... sf.col("salary") > employees.alias("e2").where( + ... sf.col("e2.department_id") == sf.col("e1.department_id").outer() + ... ).select(sf.avg("salary")).scalar() + ... ).select("name", "salary", "department_id").orderBy("name").show() + +----+------+-------------+ + |name|salary|department_id| + +----+------+-------------+ + | Bob| 6000| 101| + +----+------+-------------+ """ ... From cbb4a9d1ecfb76704ab5864d877fd7b4d89a43e1 Mon Sep 17 00:00:00 2001 From: CynicDog Date: Sat, 11 Jul 2026 21:12:15 +0900 Subject: [PATCH 2/2] Trigger CI run