You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GH-45334: [C++][Acero] Fix swiss join overflow issues in row offset calculation for fixed length and null masks (#45336)
### Rationale for this change
#45334
### What changes are included in this PR?
1. An all-mighty test case that can effectively reveal all the bugs mentioned in the issue;
2. Other than directly fixing the bugs (actually simply casting to 64-bit somewhere in the multiplication will do), I did some refinement to the buffer accessors of the row table, in order to eliminate more potential similar issues (which I believe do exist):
1. `null_masks()` -> `null_masks(row_id)` which does overflow-safe indexing inside;
2. `is_null(row_id, col_pos)` which does overflow-safe indexing and directly gets the bit of the column;
3. `data(1)` -> `fixed_length_rows(row_id)` which first asserts the row table being fixed-length, then does overflow-safe indexing inside;
4. `data(2)` -> `var_length_rows()` which only asserts the row table being var-length. It is supposed to be paired by the `offsets()` (which is already 64-bit by #43389 );
5. The `data(0/1/2)` members are made private.
3. The AVX2 specializations are fixed individually by using 64-bit multiplication and indexing.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
None.
* GitHub Issue: #45334
Authored-by: Rossi Sun <zanmato1984@gmail.com>
Signed-off-by: Rossi Sun <zanmato1984@gmail.com>
0 commit comments