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/06/13 08:29:20 UTC

[GitHub] [spark] HyukjinKwon commented on a diff in pull request #41567: [SPARK-43663][CONNECT][PS] Enable `SeriesParityTests.test_compare`

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


##########
python/pyspark/pandas/frame.py:
##########
@@ -4018,10 +4018,15 @@ def empty(self) -> bool:
         >>> ps.DataFrame({}, index=list('abc')).empty
         True
         """
-        return (
-            len(self._internal.column_labels) == 0
-            or self._internal.resolved_copy.spark_frame.rdd.isEmpty()
+        # RDD is not supported in Spark Connect, so we use the DataFrame.isEmpty function instead.
+        # We currently do not introduce any additional aliases since these two functions return the
+        # same result, and only have internal differences in their behavior.
+        is_empty = (
+            self._internal.resolved_copy.spark_frame.isEmpty()
+            if is_remote

Review Comment:
   `is_remote()`?



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