You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "ming08108 (via GitHub)" <gi...@apache.org> on 2023/06/14 02:06:14 UTC

[GitHub] [arrow-rs] ming08108 commented on a diff in pull request #4412: Fix bad cast in create_primitive_array

ming08108 commented on code in PR #4412:
URL: https://github.com/apache/arrow-rs/pull/4412#discussion_r1228887450


##########
arrow-ipc/src/reader.rs:
##########
@@ -250,24 +242,23 @@ fn create_primitive_array(
         | UInt32
         | Time32(_)
         | Date32
-        | Interval(IntervalUnit::YearMonth) => {
-            if buffers[1].len() / 8 == length && length != 1 {

Review Comment:
   I think this logic is incorrect. https://arrow.apache.org/docs/format/Columnar.html#fixed-size-primitive-layout suggests that fixed sized types Int32 are always 4 bytes.
   
   I also checked against arrow2 https://github.com/jorgecarleitao/arrow2/blob/2d2e7053f9a50810bfe9cecff25ab39089aef98e/src/array/primitive/mod.rs and didn't see any similar logic.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org