HyukjinKwon commented on code in PR #40722:
URL: https://github.com/apache/spark/pull/40722#discussion_r1170974127
##########
python/pyspark/pandas/indexing.py:
##########
@@ -1807,7 +1837,13 @@ def _select_cols_else(
)
def __setitem__(self, key: Any, value: Any) -> None:
- if not isinstance(value, (Column, ConnectColumn)) and
is_list_like(value):
+ if is_remote():
+ from pyspark.sql.connect.column import Column as ConnectColumn
+
+ Column = ConnectColumn
+ else:
+ Column = PySparkColumn # type: ignore[assignment]
+ if not isinstance(value, Column) and is_list_like(value):
Review Comment:
I think you can do the same trick with try-except
--
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]