Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/20636#discussion_r195108390 --- Diff: sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/codegen/BufferHolder.java --- @@ -61,12 +61,15 @@ * Grows the buffer by at least neededSize and points the row to the buffer. */ void grow(int neededSize) { - if (neededSize > ARRAY_MAX - totalSize()) { + assert neededSize < 0 : + "Cannot grow BufferHolder by size " + neededSize + " because the size is negative"; + int roundedSize = ByteArrayMethods.roundNumberOfBytesToNearestWord(neededSize); --- End diff -- shall we do the same thing in L55?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org