Yikun commented on a change in pull request #32821:
URL: https://github.com/apache/spark/pull/32821#discussion_r652277828



##########
File path: python/pyspark/pandas/data_type_ops/num_ops.py
##########
@@ -395,3 +400,17 @@ def astype(
             return _as_string_type(index_ops, dtype, null_str=str(np.nan))
         else:
             return _as_other_type(index_ops, dtype, spark_type)
+
+
+class DecimalOps(FractionalOps):
+    """
+    The class for decimal operations of pandas-on-Spark objects with spark 
type:
+    DecimalType.
+    """
+
+    @property
+    def pretty_name(self) -> str:
+        return "decimal"
+
+    def isnull(self, index_ops: Union["Index", "Series"]) -> Union["Series", 
"Index"]:

Review comment:
       I think this `isnull` is designed for IndexOpsMixin to match the 
pandas's `isnull` API, so I think maybe it's not a good idea to make this 
`isnull` to cover col.isnull case.
   
   The problem is that index_ops.spark.column is not datatype-based, if it's 
just for avoiding duplicated code, maybe we could add some utils function to 
address it.




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to