dongjoon-hyun commented on code in PR #1108:
URL: https://github.com/apache/orc/pull/1108#discussion_r869368112
##########
java/core/src/java/org/apache/orc/impl/TreeReaderFactory.java:
##########
@@ -1994,7 +1995,18 @@ private static byte[] commonReadByteArrays(InStream
stream, IntegerReader length
totalLength = (int) (batchSize * scratchlcv.vector[0]);
}
}
-
+ if (totalLength < 0) {
+ StringBuilder sb = new StringBuilder("totalLength:" + totalLength
+ + " is a negative number.");
+ if (batchSize > 1) {
Review Comment:
This PR seems to be mixing three things.
First, when `totalLength < 0` happens, do we need to throw a new exception
from ORC side?
Second, in the above case, when `batchSize == 1` additionally, this PR is
adding a new exception here. Logically, the following.
```java
if (totalLength < 0 && batchSize == 1) {
throw new IOException("totalLength:" + totalLength + " is a negative
number."
}
```
- If this is a meaningful error, can we proceed that in a separate PR
because we may want to backport that.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]