dongjoon-hyun commented on code in PR #46051:
URL: https://github.com/apache/spark/pull/46051#discussion_r1565184948


##########
python/pyspark/sql/connect/plan.py:
##########
@@ -1544,16 +1544,16 @@ def command(self, session: "SparkConnectClient") -> 
proto.Command:
                 plan.write_operation_v2.mode = 
proto.WriteOperationV2.Mode.MODE_CREATE
             elif wm == "overwrite":
                 plan.write_operation_v2.mode = 
proto.WriteOperationV2.Mode.MODE_OVERWRITE
+                if self.overwrite_condition is not None:
+                    plan.write_operation_v2.overwrite_condition.CopyFrom(
+                        self.col_to_expr(self.overwrite_condition, session)
+                    )
             elif wm == "overwrite_partition":
                 plan.write_operation_v2.mode = 
proto.WriteOperationV2.Mode.MODE_OVERWRITE_PARTITIONS
             elif wm == "append":
                 plan.write_operation_v2.mode = 
proto.WriteOperationV2.Mode.MODE_APPEND
             elif wm == "replace":
                 plan.write_operation_v2.mode = 
proto.WriteOperationV2.Mode.MODE_REPLACE
-                if self.overwrite_condition is not None:
-                    plan.write_operation_v2.overwrite_condition.CopyFrom(
-                        self.col_to_expr(self.overwrite_condition, session)
-                    )

Review Comment:
   According to the commit history, this is a bug of 
[SPARK-42002](https://issues.apache.org/jira/browse/SPARK-42002) from Apache 
Spark 3.4.0. Not a regression of 3.4.1~3.4.3. Did I understand correctly?



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