tustvold commented on code in PR #4681:
URL: https://github.com/apache/arrow-rs/pull/4681#discussion_r1291212073


##########
arrow-array/src/array/list_array.rs:
##########
@@ -1037,13 +1037,17 @@ mod tests {
     #[should_panic(
         expected = "Memory pointer is not aligned with the specified scalar 
type"
     )]
+    // Different error messages, so skip for now
+    // https://github.com/apache/arrow-rs/issues/1545
+    #[cfg(not(feature = "force_validate"))]
     fn test_primitive_array_alignment() {
         let buf = Buffer::from_slice_ref([0_u64]);
         let buf2 = buf.slice(1);
-        let array_data = ArrayData::builder(DataType::Int32)
-            .add_buffer(buf2)
-            .build()
-            .unwrap();
+        let array_data = unsafe {
+            ArrayData::builder(DataType::Int32)
+                .add_buffer(buf2)
+                .build_unchecked()

Review Comment:
   We have to use build_unchecked here, as ArrayData will now complain about 
the alignment :tada:



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