Skip to content

[branch-53] fix: move overflow guard before dense ratio in hash join to prevent overflows (#20998)#21008

Merged
comphead merged 1 commit intoapache:branch-53from
mbutrovich:branch-53-20998
Mar 17, 2026
Merged

[branch-53] fix: move overflow guard before dense ratio in hash join to prevent overflows (#20998)#21008
comphead merged 1 commit intoapache:branch-53from
mbutrovich:branch-53-20998

Conversation

@mbutrovich
Copy link
Contributor

@mbutrovich mbutrovich commented Mar 17, 2026

(cherry picked from commit e74e58f)

I confirmed that this fixed CometFuzzTestSuite "join" which found the original issue while testing branch-53.

Which issue does this PR close?

Rationale for this change

#20995 has details but it is very straightforward. dense_ratio calculation overflows since overflow guard is after not before

What changes are included in this PR?

Prevent hash join overflow and unit test for it

Are these changes tested?

Added a test case for both min and max scenario

…verflows (apache#20998)

## Which issue does this PR close?
- Closes apache#20995.

## Rationale for this change
apache#20995 has details but it is very straightforward. `dense_ratio`
calculation overflows since overflow guard is after not before

## What changes are included in this PR?
Prevent hash join overflow and unit test for it

## Are these changes tested?
Added a test case for both min and max scenario

Co-authored-by: Matt Butrovich <mbutrovich@users.noreply.github.com>
(cherry picked from commit e74e58f)
@github-actions github-actions bot added the physical-plan Changes to the physical-plan crate label Mar 17, 2026
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.

Thanks @mbutrovich

@comphead
Copy link
Contributor

Looks like runners are struggling to pick up some tasks

@comphead comphead merged commit b83c0e0 into apache:branch-53 Mar 17, 2026
54 of 56 checks passed
@mbutrovich mbutrovich deleted the branch-53-20998 branch March 17, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants