Jefffrey commented on code in PR #21544:
URL: https://github.com/apache/datafusion/pull/21544#discussion_r3129631052


##########
datafusion/functions-nested/benches/array_remove.rs:
##########
@@ -348,66 +373,6 @@ fn create_args(list_array: ArrayRef, element: ScalarValue) 
-> Vec<ColumnarValue>
     ]
 }
 
-fn create_int64_list_array(
-    num_rows: usize,
-    array_size: usize,
-    null_density: f64,
-) -> ArrayRef {
-    let mut rng = StdRng::seed_from_u64(SEED);
-    let values = (0..num_rows * array_size)
-        .map(|_| {
-            if rng.random::<f64>() < null_density {
-                None
-            } else {
-                Some(rng.random_range(0..array_size as i64))
-            }
-        })
-        .collect::<Int64Array>();
-    let offsets = (0..=num_rows)
-        .map(|i| (i * array_size) as i32)
-        .collect::<Vec<i32>>();
-
-    Arc::new(
-        ListArray::try_new(
-            Arc::new(Field::new("item", DataType::Int64, true)),
-            OffsetBuffer::new(offsets.into()),
-            Arc::new(values),
-            None,
-        )
-        .unwrap(),
-    )
-}
-
-fn create_f64_list_array(
-    num_rows: usize,
-    array_size: usize,
-    null_density: f64,
-) -> ArrayRef {
-    let mut rng = StdRng::seed_from_u64(SEED);
-    let values = (0..num_rows * array_size)
-        .map(|_| {
-            if rng.random::<f64>() < null_density {
-                None
-            } else {
-                Some(rng.random_range(0..array_size as i64) as f64)

Review Comment:
   Looking back at this, I think we lost some functionality, specifically in 
being able to set a range of values to generate, which can affect some of these 
benchmarks 🤔
   
   Might need to revisit this PR to see if we should revert some of these 
changes @theirix 



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