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


##########
python/pyspark/pandas/data_type_ops/num_ops.py:
##########
@@ -215,43 +215,35 @@ def abs(self, operand: IndexOpsLike) -> IndexOpsLike:
 
     def lt(self, left: IndexOpsLike, right: Any) -> SeriesOrIndex:
         _sanitize_list_like(right)
-        if is_remote():
-            from pyspark.sql.connect.column import Column as ConnectColumn
-
-            Column = ConnectColumn
-        else:
-            Column = PySparkColumn  # type: ignore[assignment]
-        return column_op(Column.__lt__)(left, right)  # type: ignore[arg-type]
+        result = pyspark_column_op("__lt__")(left, right)
+        if is_remote:
+            # In Spark Connect, it returns None instead of False, so we 
manually cast it.

Review Comment:
   Can you file a JIRA? cc @ueshin 



##########
python/pyspark/pandas/data_type_ops/num_ops.py:
##########
@@ -215,43 +215,35 @@ def abs(self, operand: IndexOpsLike) -> IndexOpsLike:
 
     def lt(self, left: IndexOpsLike, right: Any) -> SeriesOrIndex:
         _sanitize_list_like(right)
-        if is_remote():
-            from pyspark.sql.connect.column import Column as ConnectColumn
-
-            Column = ConnectColumn
-        else:
-            Column = PySparkColumn  # type: ignore[assignment]
-        return column_op(Column.__lt__)(left, right)  # type: ignore[arg-type]
+        result = pyspark_column_op("__lt__")(left, right)
+        if is_remote:

Review Comment:
   I believe this is a function



-- 
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