Commit b83c0e0
[branch-53] fix: move overflow guard before dense ratio in hash join to prevent overflows (apache#20998) (apache#21008)
(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?
- 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
- backports apache#20998 from
@buraksenn
## Are these changes tested?
Added a test case for both min and max scenario
Co-authored-by: Burak Şen <buraksenb@gmail.com>1 parent 28bb951 commit b83c0e0
1 file changed
Lines changed: 43 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | 157 | | |
159 | 158 | | |
160 | 159 | | |
161 | 160 | | |
162 | 161 | | |
163 | 162 | | |
164 | | - | |
165 | | - | |
166 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
167 | 166 | | |
168 | 167 | | |
169 | 168 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
2082 | 2082 | | |
2083 | 2083 | | |
2084 | 2084 | | |
2085 | | - | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
2086 | 2088 | | |
2087 | 2089 | | |
2088 | 2090 | | |
| |||
5499 | 5501 | | |
5500 | 5502 | | |
5501 | 5503 | | |
| 5504 | + | |
| 5505 | + | |
| 5506 | + | |
| 5507 | + | |
| 5508 | + | |
| 5509 | + | |
| 5510 | + | |
| 5511 | + | |
| 5512 | + | |
| 5513 | + | |
| 5514 | + | |
| 5515 | + | |
| 5516 | + | |
| 5517 | + | |
| 5518 | + | |
| 5519 | + | |
| 5520 | + | |
| 5521 | + | |
| 5522 | + | |
| 5523 | + | |
| 5524 | + | |
| 5525 | + | |
| 5526 | + | |
| 5527 | + | |
| 5528 | + | |
| 5529 | + | |
| 5530 | + | |
| 5531 | + | |
| 5532 | + | |
| 5533 | + | |
| 5534 | + | |
| 5535 | + | |
5502 | 5536 | | |
5503 | 5537 | | |
5504 | 5538 | | |
| |||
0 commit comments