HyukjinKwon commented on code in PR #40722:
URL: https://github.com/apache/spark/pull/40722#discussion_r1161535283


##########
python/pyspark/pandas/frame.py:
##########
@@ -12250,7 +12304,14 @@ def quantile(
             if v < 0.0 or v > 1.0:
                 raise ValueError("percentiles should all be in the interval 
[0, 1].")
 
-        def quantile(psser: "Series") -> GenericColumn:
+        if is_remote():
+            from pyspark.sql.connect.column import Column as ConnectColumn
+
+            Column = ConnectColumn
+        else:
+            Column = PySparkColumn  # type: ignore[assignment]
+
+        def quantile(psser: "Series") -> Column:  # type: ignore[valid-type]

Review Comment:
   just use PySparkColumn



##########
python/pyspark/pandas/frame.py:
##########
@@ -12759,7 +12822,16 @@ def mad(self, axis: Axis = 0) -> "Series":
 
         if axis == 0:
 
-            def get_spark_column(psdf: DataFrame, label: Label) -> 
GenericColumn:
+            if is_remote():
+                from pyspark.sql.connect.column import Column as ConnectColumn
+
+                Column = ConnectColumn
+            else:
+                Column = PySparkColumn  # type: ignore[assignment]
+
+            def get_spark_column(
+                psdf: DataFrame, label: Label
+            ) -> Column:  # type: ignore[valid-type]

Review Comment:
   just use PySparkColumn



##########
python/pyspark/pandas/frame.py:
##########
@@ -12896,7 +12966,13 @@ def mode(self, axis: Axis = 0, numeric_only: bool = 
False, dropna: bool = True)
         if numeric_only is None and axis == 0:
             numeric_only = True
 
-        mode_scols: List[GenericColumn] = []
+        if is_remote():
+            from pyspark.sql.connect.column import Column as ConnectColumn
+
+            Column = ConnectColumn
+        else:
+            Column = PySparkColumn  # type: ignore[assignment]
+        mode_scols: List[Column] = []  # 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]

Reply via email to