xinrong-databricks commented on a change in pull request #32611:
URL: https://github.com/apache/spark/pull/32611#discussion_r638268484
##########
File path: python/pyspark/pandas/data_type_ops/boolean_ops.py
##########
@@ -50,7 +50,7 @@ def pretty_name(self) -> str:
def add(self, left, right) -> Union["Series", "Index"]:
if isinstance(right, numbers.Number):
left = left.spark.transform(lambda scol:
scol.cast(as_spark_type(type(right))))
- return column_op(Column.__add__)(left, right)
+ return left + right
elif isinstance(right, IndexOpsMixin) and is_numeric_index_ops(right):
left = transform_boolean_operand_to_numeric(left,
right.spark.data_type)
return column_op(Column.__add__)(left, right)
Review comment:
You are right, I was thinking it caused an infinite recursion. `left +
right`s are applied.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]