You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/12/09 10:14:12 UTC

[GitHub] [arrow] kiszk commented on a change in pull request #8876: ARROW-10860: [Java] Avoid integer overflow for generated classes in Vector

kiszk commented on a change in pull request #8876:
URL: https://github.com/apache/arrow/pull/8876#discussion_r539178117



##########
File path: java/vector/src/main/codegen/templates/UnionListWriter.java
##########
@@ -194,13 +194,13 @@ public void endList() {
   @Override
   public void startList() {
     vector.startNewValue(idx());
-    writer.setPosition(vector.getOffsetBuffer().getInt((idx() + 1) * OFFSET_WIDTH));
+    writer.setPosition(vector.getOffsetBuffer().getInt(((long) idx() + 1L) * OFFSET_WIDTH));

Review comment:
       Sure, you are right. I just followed the style around here. I removed the explicit cast for this and others.




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