paleolimbot commented on code in PR #562:
URL: https://github.com/apache/arrow-nanoarrow/pull/562#discussion_r1684914642


##########
thirdparty/zlib/CMakeLists.txt:
##########
@@ -23,3 +23,4 @@ fetchcontent_makeavailable(nanoarrow_zlib)
 
 add_library(ZLIB::ZLIB ALIAS zlibstatic)
 target_include_directories(zlibstatic INTERFACE ${zlib_BINARY_DIR} 
${zlib_SOURCE_DIR})
+target_include_directories(zlib INTERFACE ${zlib_BINARY_DIR} 
${zlib_SOURCE_DIR})

Review Comment:
   I don't mind this, but is it needed to build?



##########
r/src/materialize_unspecified.h:
##########
@@ -33,27 +33,26 @@ static inline int nanoarrow_materialize_unspecified(struct 
ArrayViewSlice* src,
 
   int* result = LOGICAL(dst->vec_sexp);
 
-  int64_t total_offset = src->array_view->array->offset + src->offset;
-  int64_t length = src->length;
-  const uint8_t* bits = src->array_view->buffer_views[0].data.as_uint8;
-
-  if (length == 0 || src->array_view->storage_type == NANOARROW_TYPE_NA ||
-      ArrowBitCountSet(bits, total_offset, length) == 0) {
+  if (ArrowArrayViewComputeNullCount(src->array_view) == src->length) {

Review Comment:
   I'm not sure this can drop in here because we could be only materializing a 
portion of an array (i.e., there is an additional offset/length on top of the 
`ArrowArrayView`).
   
   That said, I'm pretty sure the code that I have here will crash if `bits` is 
NULL here. The unspecified type doesn't come up very often and I don't think I 
tested this particularly well when I wrote it.



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