neilconway commented on code in PR #25479:
URL: https://github.com/apache/datafusion/pull/25479#discussion_r4053377416


##########
datafusion/functions-nested/benches/array_resize.rs:
##########
@@ -80,6 +80,36 @@ fn criterion_benchmark(c: &mut Criterion) {
         &config_options,
     );
 
+    bench_case(
+        &mut group,
+        "shrink_default_null_fill_500_to_10",
+        &[
+            ColumnarValue::Array(create_int64_list_array(NUM_ROWS, 500)),
+            ColumnarValue::Array(repeated_int64_array(10)),
+        ],
+        &two_arg_fields,
+        &return_field,
+        &config_options,
+    );
+
+    // Keep the visible rows and output size fixed while varying the backing
+    // child size. Slicing a ListArray retains the entire child array.
+    for backing_rows in [NUM_ROWS, NUM_ROWS * 100] {
+        let array = create_int64_list_array(backing_rows, 10)
+            .slice((backing_rows - NUM_ROWS) / 2, NUM_ROWS);
+        bench_case(
+            &mut group,
+            
&format!("shrink_default_null_fill_sliced_10_to_5_backing_{backing_rows}"),

Review Comment:
   Thanks, done.



##########
datafusion/functions-nested/src/resize.rs:
##########
@@ -335,6 +338,10 @@ where
         let count = O::usize_as(count);
         let start = offset_window[0];
         if start + count > offset_window[1] {
+            debug_assert!(

Review Comment:
   Thanks, done.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to