hvanhovell commented on code in PR #38243:
URL: https://github.com/apache/spark/pull/38243#discussion_r996333637


##########
python/pyspark/sql/connect/plan.py:
##########
@@ -368,21 +368,45 @@ def __init__(
         left: Optional["LogicalPlan"],
         right: "LogicalPlan",
         on: "ColumnOrString",
-        how: proto.Join.JoinType.ValueType = 
proto.Join.JoinType.JOIN_TYPE_INNER,
+        how: Optional[str],
     ) -> None:
         super().__init__(left)
         self.left = cast(LogicalPlan, left)
         self.right = right
         self.on = on
         if how is None:
-            how = proto.Join.JoinType.JOIN_TYPE_INNER
-        self.how = how
+            join_type = proto.Join.JoinType.JOIN_TYPE_INNER
+        elif how == "inner":
+            join_type = proto.Join.JoinType.JOIN_TYPE_INNER
+        elif how in ["outer", "full", "fullouter"]:
+            join_type = proto.Join.JoinType.JOIN_TYPE_FULL_OUTER
+        elif how in ["leftouter", "left"]:
+            join_type = proto.Join.JoinType.JOIN_TYPE_LEFT_OUTER
+        elif how in ["rightouter", "right"]:
+            join_type = proto.Join.JoinType.JOIN_TYPE_RIGHT_OUTER
+        elif how in ["leftsemi", "semi"]:
+            join_type = proto.Join.JoinType.JOIN_TYPE_LEFT_SEMI
+        elif how in ["leftanti", "anti"]:
+            join_type = proto.Join.JoinType.JOIN_TYPE_LEFT_ANTI
+        else:

Review Comment:
   Why is that? Please keep in mind that these type of decisions increase the 
pain of porting a pyspark job over to connect.



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