WaterWhisperer commented on code in PR #12121:
URL: https://github.com/apache/arrow-rs/pull/12121#discussion_r4718362837


##########
arrow-data/src/data.rs:
##########
@@ -2683,6 +2695,95 @@ mod tests {
         assert!(build(vec![true, true, false, true]).is_err());
     }
 
+    const ROWS: usize = 8;
+    const LIST_SIZE: i32 = 8192;
+    const EXPANDED_BYTES: usize = ROWS * LIST_SIZE as usize / 8;
+
+    thread_local! {
+        static FAIL_EXPANSION: Cell<bool> = const { Cell::new(false) };
+    }
+
+    struct FailingAllocator;
+
+    #[global_allocator]
+    static ALLOCATOR: FailingAllocator = FailingAllocator;
+
+    // SAFETY: Successful allocations and all deallocations are delegated to 
System.
+    unsafe impl GlobalAlloc for FailingAllocator {

Review Comment:
   Thanks, and sorry for the delay! I was busy with exams and switching 
internships. I’ve simplified the test and updated the PR. Checked locally: both 
branches pass by default, but with a 1 MiB data limit, `main` fails and this 
passes.



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