From: <mrp...@us...> - 2013-10-23 14:09:05
|
Revision: 7470 http://bigdata.svn.sourceforge.net/bigdata/?rev=7470&view=rev Author: mrpersonick Date: 2013-10-23 14:08:59 +0000 (Wed, 23 Oct 2013) Log Message: ----------- fixed the IndexOutOfBounds problem and a problem with the term advancer Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/SliceServiceFactory.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/SliceServiceFactory.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/SliceServiceFactory.java 2013-10-23 13:40:25 UTC (rev 7469) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/SliceServiceFactory.java 2013-10-23 14:08:59 UTC (rev 7470) @@ -468,7 +468,7 @@ final byte[] endKey = keyOrder.getToKey(KeyBuilder.newInstance(), pred); //SuccessorUtil.successor(startKey.clone()); - endIndex = indexOf(ndx, endKey); + endIndex = indexOf(ndx, endKey) - 1; cache.put(pred, new CacheHit(startIndex, endIndex)); @@ -484,7 +484,7 @@ } - final long range = endIndex - startIndex; + final long range = endIndex - startIndex + 1; if (log.isTraceEnabled()) { log.trace("range: " + range); @@ -539,7 +539,7 @@ * Reading to the offset plus the limit (minus 1), or the end * index, whichever is smaller. */ - final long toIndex = Math.min(startIndex + offset + limit, + final long toIndex = Math.min(startIndex + offset + limit - 1, endIndex); if (fromIndex > toIndex) { @@ -550,7 +550,7 @@ final byte[] fromKey = ndx.keyAt(fromIndex); - final byte[] toKey = ndx.keyAt(toIndex);//SuccessorUtil.successor(ndx.keyAt(toIndex)); + final byte[] toKey = SuccessorUtil.successor(ndx.keyAt(toIndex)); final int arity = pred.arity(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |