ueshin commented on a change in pull request #32785:
URL: https://github.com/apache/spark/pull/32785#discussion_r647759027
##########
File path: python/pyspark/pandas/data_type_ops/base.py
##########
@@ -52,33 +52,42 @@
from pyspark.pandas.series import Series # noqa: F401 (SPARK-34943)
-def is_valid_operand_for_numeric_arithmetic(operand: Any, *, allow_bool: bool
= True) -> bool:
- """Check whether the operand is valid for arithmetic operations against
numerics."""
+def is_valid_operand_for_numeric_arithmetic(
+ operand: Any, *, allow_bool_index_ops: bool = True, allow_bool: bool = True
Review comment:
For the first example, pandas works for both cases:
```py
>>> pd.__version__
'1.2.4'
>>> pd.Series([True, False, True]) + pd.Series([True, False, True])
0 True
1 False
2 True
dtype: bool
>>> pd.Series([True, False, True]) + True
0 True
1 True
2 True
dtype: bool
```
so `allow_bool_index_ops` and `allow_bool` should be `True` for this case as
well. Then we can consolidate the two?
--
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]