Skip to content

Commit

Permalink
Add a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Feb 25, 2025
1 parent d5a15f5 commit 4a69312
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/pyarrow/array.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,8 @@ cdef class ArrayStatistics(_Weakrefable):
The number of nulls.
"""
null_count = self.sp_statistics.get().null_count
# We'll be able simplify this after
# https://github.com/cython/cython/issues/6692 is solved.
if null_count.has_value():
return null_count.value()
else:
Expand All @@ -742,6 +744,8 @@ cdef class ArrayStatistics(_Weakrefable):
The number of distinct values.
"""
distinct_count = self.sp_statistics.get().distinct_count
# We'll be able simplify this after
# https://github.com/cython/cython/issues/6692 is solved.
if distinct_count.has_value():
return distinct_count.value()
else:
Expand Down

0 comments on commit 4a69312

Please sign in to comment.