You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by ala <gi...@git.apache.org> on 2018/05/03 12:54:57 UTC
[GitHub] spark pull request #21227: Backport [SPARK-24133][SQL] Check for integer ove...
Github user ala commented on a diff in the pull request:
https://github.com/apache/spark/pull/21227#discussion_r185787003
--- Diff: sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/WritableColumnVector.java ---
@@ -81,7 +81,9 @@ public void close() {
}
public void reserve(int requiredCapacity) {
- if (requiredCapacity > capacity) {
+ if (requiredCapacity < 0) {
+ throwUnsupportedException(requiredCapacity, null);
--- End diff --
@adrian-wang Since this is just a backport, I would prefer to keep the modifications of the original commit to the minimum. Also, it might be a bit confusing the user, if we create `ArithmeticException` here, as this is not the place where invalid computation was performed, but just the place where we realize the input is not sane.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org