itholic commented on code in PR #40722:
URL: https://github.com/apache/spark/pull/40722#discussion_r1171092506
##########
python/pyspark/pandas/frame.py:
##########
@@ -4871,7 +4868,14 @@ def round(self, decimals: Union[int, Dict[Name, int],
"Series"] = 0) -> "DataFra
else:
raise TypeError("decimals must be an integer, a dict-like or a
Series")
- def op(psser: ps.Series) -> Union[ps.Series, GenericColumn]:
+ if is_remote():
+ from pyspark.sql.connect.column import Column as ConnectColumn
+
+ Column = ConnectColumn
+ else:
+ Column = PySparkColumn # type: ignore[assignment]
Review Comment:
It complains `UnboundLocalError: local variable 'Column' referenced before
assignment` if we don't explicitly assign the `PySparkColumn` to the variable
here, so I fixed 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]