Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-43663][CONNECT][PS] Enable SeriesParityTests.test_compare #41567

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions python/pyspark/pandas/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
itholic marked this conversation as resolved.
Show resolved Hide resolved
# 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()
else self._internal.resolved_copy.spark_frame.rdd.isEmpty()
)
return len(self._internal.column_labels) == 0 or is_empty

@property
def style(self) -> "Styler":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@


class SeriesParityComputeTests(SeriesComputeMixin, PandasOnSparkTestUtils, ReusedConnectTestCase):
@unittest.skip("TODO(SPARK-43663): Enable SeriesParityTests.test_compare.")
def test_compare(self):
super().test_compare()

@unittest.skip(
"TODO(SPARK-43611): Fix unexpected `AnalysisException` from Spark Connect client."
)
Expand Down