Skip to content

Commit a3ef778

Browse files
committed
Size of a column view in bytes may be larger than size_type
1 parent 2cf9cbf commit a3ef778

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/pylibcudf/pylibcudf/column.pyx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ from cpython.pycapsule cimport (
77
PyCapsule_New,
88
)
99

10+
from libc.stddef cimport size_t
1011
from libc.stdint cimport uintptr_t
1112

1213
from libcpp.limits cimport numeric_limits
@@ -25,6 +26,7 @@ from pylibcudf.libcudf.interop cimport (
2526
to_arrow_device_raw,
2627
to_arrow_schema_raw,
2728
)
29+
from pylibcudf.libcudf.null_mask cimport bitmask_allocation_size_bytes
2830
from pylibcudf.libcudf.scalar.scalar cimport scalar, numeric_scalar
2931
from pylibcudf.libcudf.types cimport size_type, size_of as cpp_size_of, bitmask_type
3032
from pylibcudf.libcudf.utilities.traits cimport is_fixed_width
@@ -49,7 +51,6 @@ from ._interop_helpers cimport (
4951
_release_device_array,
5052
_metadata_to_libcudf,
5153
)
52-
from .null_mask cimport bitmask_allocation_size_bytes
5354
from .utils cimport _get_stream
5455

5556
from .gpumemoryview import _datatype_from_dtype_desc
@@ -86,7 +87,7 @@ cdef class OwnerWithCAI:
8687
cdef create(column_view cv, object owner):
8788
obj = OwnerWithCAI()
8889
obj.owner = owner
89-
cdef int size
90+
cdef size_t size
9091
cdef column_view offsets_column
9192
cdef unique_ptr[scalar] last_offset
9293
if cv.type().id() == type_id.EMPTY:

0 commit comments

Comments
 (0)