itholic commented on code in PR #41570:
URL: https://github.com/apache/spark/pull/41570#discussion_r1229131060
##########
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:
Just added `get_column_class` and `get_dataframe_class`, applied to whole
code path. Also updated the PR title and description. Thanks!
--
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]