gstvg commented on code in PR #12116:
URL: https://github.com/apache/datafusion/pull/12116#discussion_r1755879897
##########
datafusion/functions/benches/union_extract.rs:
##########
@@ -0,0 +1,1121 @@
+#[macro_use]
+extern crate criterion;
+
+use crate::criterion::Criterion;
+use arrow::{
+ array::{
+ Array, BooleanArray, Int32Array, Int8Array, NullArray, StringArray,
UnionArray,
+ },
+ datatypes::{DataType, Field, Int32Type, Int8Type, UnionFields, UnionMode},
+ util::bench_util::{
+ create_boolean_array, create_primitive_array, create_string_array,
+ },
+};
+use arrow_buffer::ScalarBuffer;
+use criterion::black_box;
+use datafusion_common::ScalarValue;
+use datafusion_expr::{ColumnarValue, ScalarUDFImpl};
+use datafusion_functions::core::union_extract::{
+ eq_scalar_generic, is_sequential_generic, UnionExtractFun,
+};
+use itertools::repeat_n;
+use rand::random;
+use std::sync::Arc;
+
+fn criterion_benchmark(c: &mut Criterion) {
+ let union_extract = UnionExtractFun::new();
+
Review Comment:
If you aren't sure, I'm more than happy to not even need to include them on
the arrow-rs PR :grinning:
--
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]