Skip to content

Conversation

@Ngone51
Copy link
Member

@Ngone51 Ngone51 commented Jun 25, 2024

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.

@Ngone51 Ngone51 changed the title [SPARK-48713] Add index range check for UnsafeRow.pointTo when baseObject is byte array [SPARK-48713][SQL] Add index range check for UnsafeRow.pointTo when baseObject is byte array Jun 25, 2024
@github-actions github-actions bot added the SQL label Jun 25, 2024
@Ngone51 Ngone51 requested a review from cloud-fan June 25, 2024 13:17
@yaooqinn yaooqinn closed this in 313479c Jun 26, 2024
@yaooqinn
Copy link
Member

Merged to master, thank you @Ngone51 @cloud-fan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants