HyukjinKwon commented on code in PR #41514:
URL: https://github.com/apache/spark/pull/41514#discussion_r1223797237
##########
python/pyspark/pandas/data_type_ops/null_ops.py:
##########
@@ -43,6 +43,22 @@ class NullOps(DataTypeOps):
def pretty_name(self) -> str:
return "nulls"
+ def eq(self, left: IndexOpsLike, right: Any) -> SeriesOrIndex:
+ _sanitize_list_like(right)
+ result = pyspark_column_op("__eq__")(left, right)
+ if is_remote():
+ # TODO(SPARK-43877): Fix behavior difference for compare binary
functions.
+ result = result.fillna(False)
+ return result
+
+ def ne(self, left: IndexOpsLike, right: Any) -> SeriesOrIndex:
+ _sanitize_list_like(right)
+ result = pyspark_column_op("__ne__")(left, right)
+ if is_remote():
Review Comment:
Can you put this into `pyspark_column_op`, and add a parameter to
deduplicate the codes? e.g., `fillna=value`
--
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]