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


##########
datafusion/functions/benches/misc/get_field.rs:
##########
@@ -15,78 +15,156 @@
 // specific language governing permissions and limitations
 // under the License.
 
-use arrow::array::{ArrayRef, Int32Builder, MapBuilder, StringBuilder};
-use arrow::datatypes::{DataType, Field};
-use criterion::{Criterion, criterion_group};
+use arrow::array::{Array, ArrayRef, Int32Array, MapArray, StringViewArray, 
StructArray};
+use arrow::buffer::{NullBuffer, OffsetBuffer};
+use arrow::datatypes::{DataType, Field, FieldRef};
+use criterion::{Bencher, BenchmarkId, Criterion, criterion_group};
 use datafusion_common::ScalarValue;
 use datafusion_common::config::ConfigOptions;
 use datafusion_expr::{ColumnarValue, ScalarFunctionArgs};
 use datafusion_functions::core::get_field;
 use std::hint::black_box;
 use std::sync::Arc;
 
-/// A map array with `size` rows, each holding `entries` key/value pairs.
-/// Every tenth row is null.
-fn map_array(size: usize, entries: usize) -> ArrayRef {
-    let mut builder = MapBuilder::new(None, StringBuilder::new(), 
Int32Builder::new());
+const ROWS: usize = 1024;

Review Comment:
   Thanks, improved the benchmarks to use 8192 batch size and to test both utf8 
and utf8view.



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