Skip to content

Commit

Permalink
[ARROW-5639][Java] Remove more floating point computations
Browse files Browse the repository at this point in the history
  • Loading branch information
liyafan82 committed Jun 19, 2019
1 parent dee0fcf commit dd905f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion java/vector/src/main/codegen/templates/UnionVector.java
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,6 @@ public void setType(int index, MinorType type) {
}

private int getTypeBufferValueCapacity() {
return (int) ((typeBuffer.capacity() * 1.0) / TYPE_WIDTH);
return typeBuffer.capacity() / TYPE_WIDTH;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public int getValueCapacity() {
}

private int getValueBufferValueCapacity() {
return (int) ((valueBuffer.capacity() * 1.0) / typeWidth);
return valueBuffer.capacity() / typeWidth;
}

private int getValidityBufferValueCapacity() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public int getValueCapacity() {
}

protected int getOffsetBufferValueCapacity() {
return (int) ((offsetBuffer.capacity() * 1.0) / OFFSET_WIDTH);
return offsetBuffer.capacity() / OFFSET_WIDTH;
}

@Override
Expand Down

0 comments on commit dd905f3

Please sign in to comment.