pitrou commented on code in PR #36626:
URL: https://github.com/apache/arrow/pull/36626#discussion_r1260723966


##########
python/pyarrow/_parquet.pyx:
##########
@@ -181,11 +181,11 @@ cdef class Statistics(_Weakrefable):
     def distinct_count(self):
         """
         Distinct number of values in chunk (int).
-
-        If this is not set, will return 0.
         """
-        # This seems to be zero if not set. See: ARROW-11793
-        return self.statistics.get().distinct_count()
+        if self.has_distinct_count:
+            return self.statistics.get().distinct_count()
+        else:
+            return None

Review Comment:
   Should we do the same for `null_count`?



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

Reply via email to