zanmato1984 commented on code in PR #43760:
URL: https://github.com/apache/arrow/pull/43760#discussion_r1735508573


##########
cpp/src/arrow/compute/light_array_internal.cc:
##########
@@ -235,6 +237,7 @@ void ResizableArrayData::Clear(bool release_buffers) {
 
 Status ResizableArrayData::ResizeFixedLengthBuffers(int num_rows_new) {
   ARROW_DCHECK(num_rows_new >= 0);
+  ARROW_DCHECK(data_type_ != nullptr);

Review Comment:
   It just feels weird to ensure having been initialized by checking a 
not-so-relative member `data_type_`. But OK I get it. If so, please also check 
the passed-in `data_type` of `Init` being non-null - you can see that we don't 
have any guard on its nullability, so we may end up with NPE.



-- 
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]

Reply via email to