You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/12/01 21:25:48 UTC

[GitHub] [spark] grundprinzip commented on a diff in pull request #38866: [SPARK-40970][CONNECT][PYTHON] Support List[Column] for Join's on argument

grundprinzip commented on code in PR #38866:
URL: https://github.com/apache/spark/pull/38866#discussion_r1037574229


##########
python/pyspark/sql/connect/plan.py:
##########
@@ -721,8 +721,19 @@ def plan(self, session: "SparkConnectClient") -> proto.Relation:
                     rel.join.using_columns.append(self.on)
                 else:
                     rel.join.join_condition.CopyFrom(self.to_attr_or_expression(self.on, session))
-            else:
-                rel.join.using_columns.extend(self.on)
+            elif len(self.on) > 0:
+                if isinstance(self.on[0], str):
+                    rel.join.using_columns.extend(self.on)  # ignore: arg-type

Review Comment:
   you need to cast:
   ```suggestion
                       rel.join.using_columns.extend(cast(str, self.on))  # ignore: arg-type
   ```



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