commit | c0c2c1bf43c20015c09b2de504deffe02edaf550 | [log] [tgz] |
---|---|---|
author | Ian Maxon <imaxon@apache.org> | Tue Jun 23 19:24:12 2015 -0700 |
committer | Ian Maxon <imaxon@apache.org> | Fri Jun 26 12:27:30 2015 -0700 |
tree | 59b8493cb6dcb76d5c44776b1bb89ad193737687 | |
parent | 735bc4eda6ec0fa1ccb913e4484a4b52a6562062 [diff] |
Remove erroneous casts of list item offsets The offset of an item in a list is read and written as an int, but for some reason we were casting it down to a short when recording the offsets during list building. Change-Id: Ic058aa219e016d5efd719ddec0d1bb90a23e0c48 Reviewed-on: https://asterix-gerrit.ics.uci.edu/292 Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Reviewed-by: Steven Jacobs <sjaco002@ucr.edu>
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/builders/AbstractListBuilder.java b/asterix-om/src/main/java/edu/uci/ics/asterix/builders/AbstractListBuilder.java index c067507..2e852d5 100644 --- a/asterix-om/src/main/java/edu/uci/ics/asterix/builders/AbstractListBuilder.java +++ b/asterix-om/src/main/java/edu/uci/ics/asterix/builders/AbstractListBuilder.java
@@ -77,7 +77,7 @@ public void addItem(IValueReference item) throws HyracksDataException { try { if (!fixedSize && (item.getByteArray()[0] != serNullTypeTag || itemTypeTag == ATypeTag.ANY)) - this.offsets.add((short) outputStorage.getLength()); + this.offsets.add(outputStorage.getLength()); if (itemTypeTag == ATypeTag.ANY || (itemTypeTag == ATypeTag.NULL && item.getByteArray()[0] == serNullTypeTag)) { this.numberOfItems++;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/builders/OrderedListBuilder.java b/asterix-om/src/main/java/edu/uci/ics/asterix/builders/OrderedListBuilder.java index f32826b..bd3a8f4 100644 --- a/asterix-om/src/main/java/edu/uci/ics/asterix/builders/OrderedListBuilder.java +++ b/asterix-om/src/main/java/edu/uci/ics/asterix/builders/OrderedListBuilder.java
@@ -27,7 +27,7 @@ public void addItem(IToken token) throws IOException { if (!fixedSize) { - offsets.add((short) outputStorage.getLength()); + offsets.add(outputStorage.getLength()); } numberOfItems++; token.serializeToken(outputStorage);