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


##########
python/pyspark/pandas/indexes/multi.py:
##########
@@ -545,14 +555,23 @@ def _is_monotonic_increasing(self) -> Series:
     @staticmethod
     def _comparator_for_monotonic_decreasing(
         data_type: DataType,
-    ) -> Callable[[Column, Column, Callable[[Column, Column], Column]], 
Column]:
+    ) -> Callable[
+        [PySparkColumn, PySparkColumn, Callable[[PySparkColumn, 
PySparkColumn], PySparkColumn]],
+        PySparkColumn,
+    ]:
         return compare_disallow_null
 
     def _is_monotonic_decreasing(self) -> Series:
         window = Window.orderBy(NATURAL_ORDER_COLUMN_NAME).rowsBetween(-1, -1)
 
         cond = F.lit(True)
         has_not_null = F.lit(True)
+        if is_remote():
+            from pyspark.sql.connect.column import Column as ConnectColumn
+
+            Column = ConnectColumn
+        else:
+            Column = PySparkColumn  # type: ignore[assignment]

Review Comment:
   Shall we also make a utility function to get the attribute from `Column`?



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