@@ -790,7 +790,9 @@ def _op_method_error_message(self, other, op) -> str:
790790 def _evaluate_op_method (self , other , op , arrow_funcs ) -> Self :
791791 pa_type = self ._pa_array .type
792792 other_original = other
793- other = self ._box_pa (other )
793+ other_NA = self ._box_pa (other )
794+ # pyarrow gets upset if you try to join a NullArray
795+ other = other_NA .cast (pa_type )
794796
795797 if (
796798 pa .types .is_string (pa_type )
@@ -811,7 +813,7 @@ def _evaluate_op_method(self, other, op, arrow_funcs) -> Self:
811813 return type (self )(result )
812814 elif op in [operator .mul , roperator .rmul ]:
813815 binary = self ._pa_array
814- integral = other
816+ integral = other_NA
815817 if not pa .types .is_integer (integral .type ):
816818 raise TypeError ("Can only string multiply by an integer." )
817819 pa_integral = pc .if_else (pc .less (integral , 0 ), 0 , integral )
@@ -829,13 +831,6 @@ def _evaluate_op_method(self, other, op, arrow_funcs) -> Self:
829831 pa_integral = pc .if_else (pc .less (integral , 0 ), 0 , integral )
830832 result = pc .binary_repeat (binary , pa_integral )
831833 return type (self )(result )
832- if (
833- isinstance (other , pa .Scalar )
834- and pc .is_null (other ).as_py ()
835- and op .__name__ in ARROW_LOGICAL_FUNCS
836- ):
837- # pyarrow kleene ops require null to be typed
838- other = other .cast (pa_type )
839834
840835 pc_func = arrow_funcs [op .__name__ ]
841836 if pc_func is NotImplemented :
0 commit comments