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


##########
extensions/nanoarrow_ipc/src/nanoarrow/nanoarrow_ipc_decoder.c:
##########
@@ -1550,7 +1560,7 @@ static int ArrowIpcDecoderWalkSetArrayView(struct 
ArrowIpcArraySetter* setter,
     }
 
     setter->src.data_type = array_view->layout.buffer_data_type[i];
-    setter->src.element_size_bits = array_view->layout.element_size_bits[i];
+    setter->src.element_size_bits = 
(int32_t)array_view->layout.element_size_bits[i];

Review Comment:
   I think the theoretical maximum size in bits is `INT_MAX * 8` (because of 
this: https://github.com/apache/arrow/blob/main/format/Schema.fbs#L210 ), which 
is probably why it ended up that way. Either way, we should at least make the 
definitions consistent!



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