neilconway opened a new pull request, #26026:
URL: https://github.com/apache/datafusion/pull/26026

   ## Which issue does this PR close?
   
   - N/A
   
   ## Rationale for this change
   
   The `left`/`right` benchmarks had some shortcomings:
   
   * The `Utf8` cases used fixed-length (32-byte) strings, whereas `Utf8View` 
used variable-length strings. Drawing the inputs from different distributions 
made it hard to compare results between the two data types; also, using 
fixed-length strings results in unrealistically good branch prediction, which 
can hide performance problems on typical real-world data.
   * All the benchmarks tested a variably-sized result length, which is not 
super common in practice; `left(s, k)` for a constant `k` is more common.
   * The UDF's return type was hard-coded to `Utf8View`, so the benchmarks 
panicked in debug mode.
   
   ## What changes are included in this PR?
   
   * Only test variably-sized strings for both data types
   * Use fixed result length for all benchmark cases except one
   * Add benchmark cases for long strings with small `n`, negative `n`, and for 
`n` exceeding the input string length
   * Fix UDF return type
   
   ## What is the testing strategy for this PR?
   
   Only benchmark changes.
   
   ## Are there any user-facing changes?
   
   No.
   


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