Copilot commented on code in PR #51161:
URL: https://github.com/apache/arrow/pull/51161#discussion_r3938101216
##########
python/pyarrow/array.pxi:
##########
@@ -4293,8 +4293,9 @@ cdef class DictionaryArray(Array):
return self._indices
@staticmethod
- def from_buffers(DataType type, int64_t length, buffers, Array dictionary,
- int64_t null_count=-1, int64_t offset=0):
+ def from_buffers(DataType type not None, int64_t length, buffers,
+ Array dictionary, int64_t null_count=-1,
+ int64_t offset=0):
Review Comment:
`DictionaryArray.from_buffers()` still accepts `dictionary=None` even though
the implementation dereferences `dictionary` unconditionally
(`dictionary.sp_array.get().data()`), which can still segfault. To fully
address “reject null required Arrow objects”, make the `dictionary` argument
`not None` as well (or add an explicit check) so `None` raises `TypeError` at
the boundary.
--
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]