You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "dongjoon-hyun (via GitHub)" <gi...@apache.org> on 2026/06/13 22:57:03 UTC
[PR] [SPARK-57427][CORE] Improve `UTF8String` bounds checks with `Objects.checkIndex` [spark]
dongjoon-hyun opened a new pull request, #56489:
URL: https://github.com/apache/spark/pull/56489
### What changes were proposed in this pull request?
Use `java.util.Objects.checkIndex(index, length)` (Java 9+) in place of the
hand-written `index < 0 || index >= length` bounds checks in `UTF8String.getChar`
and `UTF8String.codePointFrom`.
### Why are the changes needed?
It replaces boilerplate with a single, intention-revealing JDK call. No functional
change (the same `IndexOutOfBoundsException` is thrown).
Additionally, this provides a better exception message.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.8)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57427][CORE] Improve `UTF8String` bounds checks with `Objects.checkIndex` [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #56489: [SPARK-57427][CORE] Improve `UTF8String` bounds checks with `Objects.checkIndex`
URL: https://github.com/apache/spark/pull/56489
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57427][CORE] Improve `UTF8String` bounds checks with `Objects.checkIndex` [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #56489:
URL: https://github.com/apache/spark/pull/56489#issuecomment-4702239670
Thank you, @peter-toth !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57427][CORE] Improve `UTF8String` bounds checks with `Objects.checkIndex` [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #56489:
URL: https://github.com/apache/spark/pull/56489#issuecomment-4702243636
Merged to master/4.x.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org