HyukjinKwon commented on code in PR #40525:
URL: https://github.com/apache/spark/pull/40525#discussion_r1155888734


##########
python/pyspark/pandas/data_type_ops/num_ops.py:
##########
@@ -78,6 +82,7 @@ def add(self, left: IndexOpsLike, right: Any) -> 
SeriesOrIndex:
             raise TypeError("Addition can not be applied to given types.")
 
         right = transform_boolean_operand_to_numeric(right, 
spark_type=left.spark.data_type)
+        Column: Type[GenericColumn] = ConnectColumn if is_remote() else 
PySparkColumn
         return column_op(Column.__add__)(left, right)

Review Comment:
   ditto



##########
python/pyspark/pandas/data_type_ops/num_ops.py:
##########
@@ -86,14 +91,15 @@ def sub(self, left: IndexOpsLike, right: Any) -> 
SeriesOrIndex:
             raise TypeError("Subtraction can not be applied to given types.")
 
         right = transform_boolean_operand_to_numeric(right, 
spark_type=left.spark.data_type)
+        Column: Type[GenericColumn] = ConnectColumn if is_remote() else 
PySparkColumn
         return column_op(Column.__sub__)(left, right)

Review Comment:
   ditto



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