You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2023/05/25 07:38:35 UTC

[GitHub] [spark] HyukjinKwon commented on a diff in pull request #41305: [SPARK-43666][SPARK-43667][SPARK-43668][SPARK-43669][PS] Fix `BinaryOps` for Spark Connect

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


##########
python/pyspark/pandas/data_type_ops/binary_ops.py:
##########
@@ -70,27 +71,49 @@ def lt(self, left: IndexOpsLike, right: Any) -> SeriesOrIndex:
         from pyspark.pandas.base import column_op
 
         _sanitize_list_like(right)
+        if is_remote():
+            from pyspark.sql.connect.column import Column as ConnectColumn
 
-        return column_op(Column.__lt__)(left, right)
+            Column = ConnectColumn
+        else:
+            Column = PySparkColumn  # type: ignore[assignment]

Review Comment:
   Can we get a one utility to get the column class at least? e.g., `utils.pyspark_column_op("__lt__")`



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org