Skip to content

Conversation

@CuteChuanChuan
Copy link
Contributor

Which issue does this PR close?

Related to #19994 - This PR extracts the benchmark code to allow performance comparison.

Rationale for this change

As pointed out by @alamb in #19994, this separates the microbenchmark code so that the benchmarking scripts can compare the optimization PR against main with the benchmark already in place.

What changes are included in this PR?

Adds a microbenchmark for the divide-by-zero protection pattern in case_when.rs:

  • Benchmarks with varying percentages of zeros (0%, 10%, 50%, 90%)
  • Compares DivideByZeroProtection pattern (where checked column matches divisor) vs ExpressionOrExpression fallback (where they don't match)

Are these changes tested?

benchmark code only.

Are there any user-facing changes?

No.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me -- thank you @CuteChuanChuan

@alamb alamb added this pull request to the merge queue Jan 30, 2026
Merged via the queue into apache:main with commit b50e1f7 Jan 30, 2026
32 checks passed
@CuteChuanChuan CuteChuanChuan deleted the raymond/add-divide-by-zero-benchmark branch January 31, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants