HyukjinKwon commented on code in PR #40722:
URL: https://github.com/apache/spark/pull/40722#discussion_r1161534944
##########
python/pyspark/pandas/frame.py:
##########
@@ -8536,10 +8550,17 @@ def rename(col: str) -> str:
data_columns = []
column_labels = []
- def left_scol_for(label: Label) -> GenericColumn:
+ if is_remote():
+ from pyspark.sql.connect.column import Column as ConnectColumn
+
+ Column = ConnectColumn
+ else:
+ Column = PySparkColumn # type: ignore[assignment]
+
+ def left_scol_for(label: Label) -> Column: # type: ignore[valid-type]
Review Comment:
just use PySparkColumn
##########
python/pyspark/pandas/frame.py:
##########
@@ -10221,7 +10242,13 @@ def _reindex_columns(
"shape (1,{}) doesn't match the shape
(1,{})".format(len(col), level)
)
fill_value = np.nan if fill_value is None else fill_value
- scols_or_pssers: List[Union[GenericColumn, "Series"]] = []
+ if is_remote():
+ from pyspark.sql.connect.column import Column as ConnectColumn
+
+ Column = ConnectColumn
+ else:
+ Column = PySparkColumn # type: ignore[assignment]
+ scols_or_pssers: List[Union[Column, "Series"]] = [] # type:
ignore[valid-type]
Review Comment:
just use PySparkColumn
--
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]