cxzl25 commented on code in PR #1031: URL: https://github.com/apache/parquet-mr/pull/1031#discussion_r1109244080
########## parquet-common/src/main/java/org/apache/parquet/bytes/CapacityByteArrayOutputStream.java: ########## @@ -220,6 +221,11 @@ public void write(byte b[], int off, int len) { currentSlabIndex += len; bytesUsed += len; } + if (bytesUsed < 0) { Review Comment: Thanks, I moved the check for overflow to before starting to write. -- 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: dev-unsubscr...@parquet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org