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


##########
python/pyspark/pandas/data_type_ops/num_ops.py:
##########
@@ -461,11 +494,13 @@ def rpow(self, left: IndexOpsLike, right: Any) -> 
SeriesOrIndex:
         if not isinstance(right, numbers.Number):
             raise TypeError("Exponentiation can not be applied to given 
types.")
 
-        def rpow_func(left: Column, right: Any) -> Column:
+        Column = ConnectColumn if is_remote() else PySparkColumn
+
+        def rpow_func(left: GenericColumn, right: Any) -> GenericColumn:
             return (
-                F.when(left.isNull(), np.nan)
+                F.when(left.isNull(), np.nan)  # type: ignore
                 .when(F.lit(right == 1), right)
-                .otherwise(Column.__rpow__(left, right))
+                .otherwise(Column.__rpow__(left, right))  # type: ignore

Review Comment:
   ditto `left.__rpow__`



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