You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/06/30 07:55:12 UTC

[GitHub] [spark] xuanyuanking commented on a change in pull request #28937: [SPARK-32115][SQL] Fix SUBSTRING to handle integer overflows

xuanyuanking commented on a change in pull request #28937:
URL: https://github.com/apache/spark/pull/28937#discussion_r447484628



##########
File path: common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java
##########
@@ -341,8 +341,17 @@ public UTF8String substringSQL(int pos, int length) {
     // to the -ith element before the end of the sequence. If a start index i is 0, it
     // refers to the first element.
     int len = numChars();
+    // `len + pos` does not overflow as `len >= 0`.

Review comment:
       Thanks for reviewing!




----------------------------------------------------------------
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.

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