File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
python/pylibcudf/pylibcudf Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ from cpython.pycapsule cimport (
88)
99
1010from libc.stddef cimport size_t
11- from libc.stdint cimport uintptr_t
11+ from libc.stdint cimport uintptr_t, int32_t, int64_t
1212
1313from libcpp.limits cimport numeric_limits
1414from libcpp.memory cimport make_unique, unique_ptr
@@ -102,7 +102,12 @@ cdef class OwnerWithCAI:
102102 if num_children:
103103 offsets_column = cv.child(0 )
104104 last_offset = get_element(offsets_column, offsets_column.size() - 1 )
105- size = (< numeric_scalar[size_type] * > last_offset.get()).value()
105+ if offsets_column.type().id() == type_id.INT32:
106+ size = (< numeric_scalar[int32_t] * > last_offset.get()).value()
107+ elif offsets_column.type().id() == type_id.INT64:
108+ size = (< numeric_scalar[int64_t] * > last_offset.get()).value()
109+ else :
110+ raise RuntimeError (" Invalid strings column offset dtype" )
106111 else :
107112 # All other types store data in the children, so the parent size is 0
108113 size = 0
You can’t perform that action at this time.
0 commit comments