Rich-T-kid opened a new pull request, #27440: URL: https://github.com/apache/datafusion/pull/27440
## Which issue does this PR close? - Part of #20935. ## Rationale for this change `replace(dictionary, scalar, scalar)` currently coerces the dictionary to a flat string array before invoking the function, so replacement runs once per row. DataFusion's performance contribution workflow requires canonical benchmark coverage before changing that behavior. ## What changes are included in this PR? This benchmark-only PR adds dictionary cases to the existing `string_expressions` Criterion target. The cases use the UDF's real coercion and return-field APIs and perform the resolved casts inside each measured iteration, so the benchmark can remain unchanged when dictionary preservation is implemented. It covers 65,536 rows at cardinalities 16, 256, 4,096, and 65,536, plus retained and oversized backing dictionaries. ## What is the testing strategy for this PR? ```text cargo fmt --all -- --check cargo check -p datafusion-functions --bench string_expressions cargo bench -p datafusion-functions --bench string_expressions -- replace_dictionary --quick git diff --check ``` Current `main` baseline (Criterion middle estimates): | Case | Time | |---|---:| | cardinality 16 | 1.4099 ms | | cardinality 256 | 1.4179 ms | | cardinality 4,096 | 1.3542 ms | | cardinality 65,536 | 1.3792 ms | | retained backing 4,096 | 1.3937 ms | | oversized backing 262,144 | 1.3639 ms | ## Are there any user-facing changes? No. This PR only adds benchmark coverage. -- 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]
