HyukjinKwon commented on a change in pull request #34114:
URL: https://github.com/apache/spark/pull/34114#discussion_r716576916
##########
File path: python/pyspark/pandas/base.py
##########
@@ -394,7 +394,17 @@ def __abs__(self: IndexOpsLike) -> IndexOpsLike:
# comparison operators
def __eq__(self, other: Any) -> SeriesOrIndex: # type: ignore[override]
- return self._dtype_op.eq(self, other)
+ if isinstance(other, (list, tuple)):
+ with ps.option_context("compute.ordered_head", True):
+ pindex_ops = self.head(len(other) + 1)._to_internal_pandas()
# type: ignore
Review comment:
can we avoid collecting `self` to compare?
--
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]