You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2025/04/03 03:19:56 UTC

Re: [PR] [SPARK-50131][SQL] Add IN Subquery DataFrame API [spark]

zhengruifeng commented on code in PR #50470:
URL: https://github.com/apache/spark/pull/50470#discussion_r2026048791


##########
python/pyspark/sql/connect/column.py:
##########
@@ -461,6 +462,18 @@ def outer(self) -> ParentColumn:
         return Column(self._expr)
 
     def isin(self, *cols: Any) -> ParentColumn:
+        from pyspark.sql.connect.dataframe import DataFrame
+
+        if len(cols) == 1 and isinstance(cols[0], DataFrame):
+            if isinstance(self._expr, UnresolvedFunction) and self._expr._name == "struct":

Review Comment:
   for the case `col.isin(df)`, when the `col` is a struct column and `df` only contains a struct column, what will happen?



-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org