Skip to content

Commit

Permalink
Suppress warning
Browse files Browse the repository at this point in the history
  • Loading branch information
danepitkin committed Oct 11, 2023
1 parent 5349432 commit e808e2c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,14 @@ public static ValueVector decode(ValueVector indices, Dictionary dictionary, Buf
* @param valueCount dictionary vector valueCount.
* @return index type.
*/
@SuppressWarnings("ComparisonOutOfRange")
public static ArrowType.Int getIndexType(int valueCount) {
Preconditions.checkArgument(valueCount >= 0);
if (valueCount <= Byte.MAX_VALUE) {
return new ArrowType.Int(8, true);
} else if (valueCount <= Character.MAX_VALUE) {
return new ArrowType.Int(16, true);
} else if (valueCount <= Integer.MAX_VALUE) {
} else if (valueCount <= Integer.MAX_VALUE) { //this comparison will always evaluate to true
return new ArrowType.Int(32, true);
} else {
return new ArrowType.Int(64, true);
Expand Down

0 comments on commit e808e2c

Please sign in to comment.