Skip to content

Commit

Permalink
cache null count for short circuit case
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Jan 10, 2025
1 parent ff22515 commit ec19d52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/cudf/cudf/_lib/column.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ cdef class Column:
def null_count(self):
if self._null_count is None:
if not self.nullable or self.size == 0:
return 0
self._null_count = 0
with acquire_spill_lock():
self._null_count = pylibcudf.null_mask.null_count(
self.base_mask.get_ptr(mode="read"),
Expand Down

0 comments on commit ec19d52

Please sign in to comment.