xinrong-databricks commented on a change in pull request #32821:
URL: https://github.com/apache/spark/pull/32821#discussion_r651963338



##########
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:
       A second thought, if `isnull` returns `pyspark.sql.column.Column` 
(`index_ops.spark.column.isNull() | F.isnan(index_ops.spark.column)` in this 
case), 
https://github.com/apache/spark/blob/master/python/pyspark/pandas/data_type_ops/num_ops.py#L386-L389
 can leverage `isnull` as well. How do you think about that?




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