ueshin commented on a change in pull request #32785:
URL: https://github.com/apache/spark/pull/32785#discussion_r647765740



##########
File path: python/pyspark/pandas/data_type_ops/boolean_ops.py
##########
@@ -73,7 +77,9 @@ def sub(self, left, right) -> Union["Series", "Index"]:
             return left - right
 
     def mul(self, left, right) -> Union["Series", "Index"]:
-        if not is_valid_operand_for_numeric_arithmetic(right, 
allow_bool=False):
+        if not is_valid_operand_for_numeric_arithmetic(
+            right, allow_bool_index_ops=False, allow_bool=False

Review comment:
       This should allow bools and behave like `&`?
   
   ```py
   >>> pd.Series([True, False, True]) * pd.Series([True, False, False])
   0     True
   1    False
   2    False
   dtype: bool
   >>> pd.Series([True, False, True]) * True
   0     True
   1    False
   2     True
   dtype: bool
   >>> pd.Series([True, False, True]) * False
   0    False
   1    False
   2    False
   dtype: bool
   ```




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

Reply via email to