Copilot commented on code in PR #50391:
URL: https://github.com/apache/arrow/pull/50391#discussion_r3529220256


##########
ruby/red-arrow-format/lib/arrow-format/type.rb:
##########
@@ -154,6 +162,10 @@ def buffer_type
       :s16
     end
 
+    def pack_template
+      "s"
+    end

Review Comment:
   pack_template uses native-endian pack directives for 16/32/64-bit integers 
and floats (e.g., "s", "l", "q", "f", "d"). Arrow IPC buffers are defined as 
little-endian, and this library already writes little-endian elsewhere (e.g., 
file-writer packs sizes with "l<"). On big-endian systems, these templates will 
produce incorrect buffers. Please switch to explicit little-endian directives 
(e.g., "s<"/"S<", "l<"/"L<", "q<"/"Q<", and "e"/"E" for float32/float64) across 
all newly added pack_template methods.



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