-
Notifications
You must be signed in to change notification settings - Fork 28.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-48713][SQL] Add index range check for UnsafeRow.pointTo when b…
…aseObject is byte array ### What changes were proposed in this pull request? This PR proposes to add a index range check for `UnsafeRow.pointTo()` when `baseObject` is byte array. ### Why are the changes needed? All the other places like `readExternal()`, `read()` ensures `sizeInBytes` can't be larger than the lenght of `baseObject` when it is a byte array excepet `pointTo()`. So adding this check helps us to get better error stack info in the first place when the index went wrong. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Added unit test. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #47087 from Ngone51/ur. Authored-by: Yi Wu <[email protected]> Signed-off-by: Kent Yao <[email protected]>
- Loading branch information
Showing
2 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters