Skip to content

array_replace benchmark does not exercise the array_replace kernel #22121

@kumarUjjawal

Description

@kumarUjjawal

Describe the bug

The array_replace benchmark calls expr_fn::array_replace_all, which only constructs an Expr::ScalarFunction node, it does not execute the underlying array_replace_all_inner kernel.

As a result, the benchmark measures Expr construction and cloning, not kernel performance. It cannot detect regressions in the function it was originally introduced to protect (added in #8337 — "Avoid concat for array_replace").

To Reproduce

expr_fn::array_replace_all is generated by make_udf_expr_and_func! and returns:

Expr::ScalarFunction { fun: array_replace_all_udf, args: [...] }

It never invokes array_replace_all_inner.

Expected behavior

The benchmark should invoke the kernel on ArrayRef inputs, for example via the ScalarUDFImpl::invoke_* path or by calling array_replace_all_inner directly so that it measures actual replacement performance and guards against kernel regressions.

Additional context

Discovered while investigating #18447.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions