This is an automated email from the ASF dual-hosted git repository.

Jefffrey pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new 36564076a1 introduce byte coalesce-kernal benchmarks (#10797)
36564076a1 is described below

commit 36564076a1d20f58f36ee45259e303fee891e62b
Author: RIchard Baah <[email protected]>
AuthorDate: Wed Aug 26 03:38:13 2026 -0400

    introduce byte coalesce-kernal benchmarks (#10797)
    
    # Which issue does this PR close?
    
    <!--
    We generally require a GitHub issue to be filed for all bug fixes and
    enhancements and this helps us generate change logs for our releases.
    You can link an issue to this PR using the GitHub syntax.
    -->
    
    - works towards #7764.
    
    # Rationale for this change
    a way to measure progress in #7764 + #10799
    <!--
    Why are you proposing this change? If this is already explained clearly
    in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand
    your changes and offer better suggestions for fixes.
    -->
    
    # What changes are included in this PR?
    new benchmarks
    <!--
    There is no need to duplicate the description in the issue here but it
    is sometimes worth providing a summary of the individual changes in this
    PR.
    -->
    
    # Are these changes tested?
    n/a
    <!--
    We typically require tests for all PRs in order to:
    1. Prevent the code from being accidentally broken by subsequent changes
    2. Serve as another way to document the expected behavior of the code
    
    If tests are not included in your PR, please explain why (for example,
    are they covered by existing tests)?
    
    If this PR claims a performance improvement, please include evidence
    such as benchmark results.
    -->
    
    # Are there any user-facing changes?
    no
    <!--
    If there are user-facing changes then we may require documentation to be
    updated before approving the PR.
    
    If there are any breaking changes to public APIs, please call them out.
    -->
---
 arrow/benches/coalesce_kernels.rs | 66 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/arrow/benches/coalesce_kernels.rs 
b/arrow/benches/coalesce_kernels.rs
index f5036a9bcd..2b0981efa9 100644
--- a/arrow/benches/coalesce_kernels.rs
+++ b/arrow/benches/coalesce_kernels.rs
@@ -72,6 +72,17 @@ fn add_all_filter_benchmarks(c: &mut Criterion) {
         Field::new("binaryview_val", DataType::BinaryView, true),
     ]));
 
+    // Single Utf8 column
+    let single_utf8_schema =
+        SchemaRef::new(Schema::new(vec![Field::new("value", DataType::Utf8, 
true)]));
+
+    // Single Binary column
+    let single_binary_schema = SchemaRef::new(Schema::new(vec![Field::new(
+        "value",
+        DataType::Binary,
+        true,
+    )]));
+
     // Mixed primitive, StringArray
     let mixed_utf8_schema = SchemaRef::new(Schema::new(vec![
         Field::new("int32_val", DataType::Int32, true),
@@ -156,6 +167,30 @@ fn add_all_filter_benchmarks(c: &mut Criterion) {
             }
             .build();
 
+            FilterBenchmarkBuilder {
+                c,
+                name: "single_utf8",
+                batch_size,
+                num_output_batches: 50,
+                null_density,
+                selectivity,
+                max_string_len: 30,
+                schema: &single_utf8_schema,
+            }
+            .build();
+
+            FilterBenchmarkBuilder {
+                c,
+                name: "single_binary",
+                batch_size,
+                num_output_batches: 50,
+                null_density,
+                selectivity,
+                max_string_len: 30,
+                schema: &single_binary_schema,
+            }
+            .build();
+
             // Model mostly short strings, but some longer ones
             FilterBenchmarkBuilder {
                 c,
@@ -300,6 +335,15 @@ fn add_all_take_benchmarks(c: &mut Criterion) {
         Field::new("utf8", DataType::Utf8, true),
     ]));
 
+    let single_utf8_schema =
+        SchemaRef::new(Schema::new(vec![Field::new("value", DataType::Utf8, 
true)]));
+
+    let single_binary_schema = SchemaRef::new(Schema::new(vec![Field::new(
+        "value",
+        DataType::Binary,
+        true,
+    )]));
+
     let mixed_dict_schema = SchemaRef::new(Schema::new(vec![
         Field::new(
             "string_dict",
@@ -355,6 +399,18 @@ fn add_all_take_benchmarks(c: &mut Criterion) {
                     max_string_len: 128,
                     schema: &mixed_binaryview_schema,
                 },
+                TakeBenchmarkScenario {
+                    name: "single_utf8",
+                    num_output_batches: 50,
+                    max_string_len: 30,
+                    schema: &single_utf8_schema,
+                },
+                TakeBenchmarkScenario {
+                    name: "single_binary",
+                    num_output_batches: 50,
+                    max_string_len: 30,
+                    schema: &single_binary_schema,
+                },
                 TakeBenchmarkScenario {
                     name: "mixed_utf8",
                     num_output_batches: 20,
@@ -927,6 +983,16 @@ impl DataStreamBuilder {
                 self.batch_size,
                 self.null_density,
             )), // TODO seed
+            DataType::Binary => 
Arc::new(create_binary_array_with_len_range_and_prefix_and_seed::<
+                i32,
+            >(
+                self.batch_size,
+                self.null_density,
+                0,
+                self.max_string_len,
+                b"",
+                seed,
+            )),
             DataType::Utf8View => {
                 Arc::new(create_string_view_array_with_max_len(
                     self.batch_size,

Reply via email to