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/11/23 23:58:46 UTC

[GitHub] [spark] amaliujia commented on a diff in pull request #38778: [SPARK-41227][CONNECT][PYTHON] Implement `DataFrame.crossJoin`

amaliujia commented on code in PR #38778:
URL: https://github.com/apache/spark/pull/38778#discussion_r1030950684


##########
python/pyspark/sql/connect/plan.py:
##########
@@ -640,6 +640,8 @@ def __init__(
             join_type = proto.Join.JoinType.JOIN_TYPE_LEFT_SEMI
         elif how in ["leftanti", "anti"]:
             join_type = proto.Join.JoinType.JOIN_TYPE_LEFT_ANTI
+        elif how == "cross":
+            join_type = proto.Join.JoinType.JOIN_TYPE_CROSS

Review Comment:
   you will also need to update the error message in `else` in which `cross join` is not mentioned:
   
   ``` 
   else:
               raise NotImplementedError(
                   """
                   Unsupported join type: %s. Supported join types include:
                   "inner", "outer", "full", "fullouter", "full_outer",
                   "leftouter", "left", "left_outer", "rightouter",
                   "right", "right_outer", "leftsemi", "left_semi",
                   "semi", "leftanti", "left_anti", "anti",
                   """
                   % how
               )
    ```



##########
connector/connect/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -19,9 +19,7 @@ package org.apache.spark.sql.connect.planner
 
 import scala.collection.JavaConverters._
 import scala.collection.mutable
-

Review Comment:
   Should revert these?



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