commit | d48d18fd2cc3fe225e3fe4112580d2e1e3edbdcf | [log] [tgz] |
---|---|---|
author | pouria.pirzadeh@gmail.com <pouria.pirzadeh@gmail.com> | Tue Jul 28 11:51:42 2015 -0700 |
committer | Pouria Pirzadeh <pouria.pirzadeh@gmail.com> | Tue Jul 28 14:05:34 2015 -0700 |
tree | 5a06c1972fdb8eead04732e797899fb342c23cd9 | |
parent | da37cb2454210c53d88da0d53c26fe4837ca6b77 [diff] |
NKC fix for int64 Change-Id: I60b3ec3f15921093b1fa11ac9fc157b7930f4e4d Reviewed-on: https://asterix-gerrit.ics.uci.edu/329 Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Reviewed-by: Ian Maxon <imaxon@apache.org> Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
diff --git a/hyracks/hyracks-dataflow-common/src/main/java/edu/uci/ics/hyracks/dataflow/common/data/normalizers/Integer64NormalizedKeyComputerFactory.java b/hyracks/hyracks-dataflow-common/src/main/java/edu/uci/ics/hyracks/dataflow/common/data/normalizers/Integer64NormalizedKeyComputerFactory.java index bcff79f..1608327 100644 --- a/hyracks/hyracks-dataflow-common/src/main/java/edu/uci/ics/hyracks/dataflow/common/data/normalizers/Integer64NormalizedKeyComputerFactory.java +++ b/hyracks/hyracks-dataflow-common/src/main/java/edu/uci/ics/hyracks/dataflow/common/data/normalizers/Integer64NormalizedKeyComputerFactory.java
@@ -34,7 +34,7 @@ public int normalize(byte[] bytes, int start, int length) { long value = LongPointable.getLong(bytes, start); int highValue = (int) (value >> 32); - if (highValue > 0) { + if (value > Integer.MAX_VALUE) { /** * larger than Integer.MAX */ @@ -42,7 +42,7 @@ highNmk >>= 2; highNmk |= POSTIVE_LONG_MASK; return highNmk; - } else if (highValue == 0) { + } else if (value >=0 && value <= Integer.MAX_VALUE) { /** * smaller than Integer.MAX but >=0 */