itholic commented on code in PR #40722:
URL: https://github.com/apache/spark/pull/40722#discussion_r1168242912
##########
python/pyspark/pandas/data_type_ops/date_ops.py:
##########
@@ -80,35 +76,33 @@ def rsub(self, left: IndexOpsLike, right: Any) ->
SeriesOrIndex:
)
if isinstance(right, datetime.date) and not isinstance(right,
datetime.datetime):
warnings.warn(msg, UserWarning)
- return -column_op(cast(Callable[..., GenericColumn], F.datediff))(
- left, F.lit(right)
- ).astype("long")
+ return -column_op(F.datediff)(left, F.lit(right)).astype("long")
else:
raise TypeError("Date subtraction can only be applied to date
series.")
def lt(self, left: IndexOpsLike, right: Any) -> SeriesOrIndex:
from pyspark.pandas.base import column_op
_sanitize_list_like(right)
- return column_op(cast(Callable[..., GenericColumn],
Column.__lt__))(left, right)
+ return column_op(Column.__lt__)(left, right)
Review Comment:
Seems like we should branch `ConnectColumn` and `PySparkColumn`. Let me
address it
--
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]