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

[GitHub] [spark] itholic opened a new pull request, #41362: [SPARK-43687][SPARK-43688][SPARK-43689][SPARK-43690][PS] Fix `NumOps` for Spark Connect

itholic opened a new pull request, #41362:
URL: https://github.com/apache/spark/pull/41362

   ### What changes were proposed in this pull request?
   
   This PR proposes to fix `NullOps` test for pandas API on Spark with Spark Connect.
   
   This includes SPARK-43687, SPARK-43688, SPARK-43689, SPARK-43690 at once, because they are all related similar modifications in single file.
   
   
   ### Why are the changes needed?
   
   To support all features for pandas API on Spark with Spark Connect.
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, `NumOps.lt`,  `NumOps.le`, `NumOps.ge`, `NumOps.gt` are now working as expected on Spark Connect.
   
   
   ### How was this patch tested?
   
   Uncomment the UTs, and tested manually.
   


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


[GitHub] [spark] HyukjinKwon closed pull request #41362: [SPARK-43687][SPARK-43688][SPARK-43689][SPARK-43690][PS] Fix `NumOps` for Spark Connect

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #41362: [SPARK-43687][SPARK-43688][SPARK-43689][SPARK-43690][PS] Fix `NumOps` for Spark Connect
URL: https://github.com/apache/spark/pull/41362


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


[GitHub] [spark] HyukjinKwon commented on pull request #41362: [SPARK-43687][SPARK-43688][SPARK-43689][SPARK-43690][PS] Fix `NumOps` for Spark Connect

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #41362:
URL: https://github.com/apache/spark/pull/41362#issuecomment-1568239435

   Merged to master.


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


[GitHub] [spark] HyukjinKwon commented on a diff in pull request #41362: [SPARK-43687][SPARK-43688][SPARK-43689][SPARK-43690][PS] Fix `NumOps` for Spark Connect

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
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: 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


[GitHub] [spark] itholic commented on a diff in pull request #41362: [SPARK-43687][SPARK-43688][SPARK-43689][SPARK-43690][PS] Fix `NumOps` for Spark Connect

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #41362:
URL: https://github.com/apache/spark/pull/41362#discussion_r1209735646


##########
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:
   Just created a JIRA (SPARK-43877) & updated the comment.



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