asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject incubator-asterixdb git commit: Remove erroneous casts of list item offsets
Date Fri, 26 Jun 2015 19:29:25 GMT
Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master 735bc4eda -> c0c2c1bf4


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>


Project: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/commit/c0c2c1bf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/tree/c0c2c1bf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/diff/c0c2c1bf

Branch: refs/heads/master
Commit: c0c2c1bf43c20015c09b2de504deffe02edaf550
Parents: 735bc4e
Author: Ian Maxon <imaxon@apache.org>
Authored: Tue Jun 23 19:24:12 2015 -0700
Committer: Ian Maxon <imaxon@apache.org>
Committed: Fri Jun 26 12:27:30 2015 -0700

----------------------------------------------------------------------
 .../java/edu/uci/ics/asterix/builders/AbstractListBuilder.java     | 2 +-
 .../main/java/edu/uci/ics/asterix/builders/OrderedListBuilder.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/c0c2c1bf/asterix-om/src/main/java/edu/uci/ics/asterix/builders/AbstractListBuilder.java
----------------------------------------------------------------------
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 abstract class AbstractListBuilder implements IAsterixListBuilder
{
     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++;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/c0c2c1bf/asterix-om/src/main/java/edu/uci/ics/asterix/builders/OrderedListBuilder.java
----------------------------------------------------------------------
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 class OrderedListBuilder extends AbstractListBuilder {
 
     public void addItem(IToken token) throws IOException {
         if (!fixedSize) {
-            offsets.add((short) outputStorage.getLength());
+            offsets.add(outputStorage.getLength());
         }
         numberOfItems++;
         token.serializeToken(outputStorage);


Mime
View raw message