[Mulgara-svn] r1430 - branches/xa11/src/jar/resolver-store/java/org/mulgara/store/statement/xa
pag at mulgara.org
pag at mulgara.org
Mon Jan 12 21:09:57 UTC 2009
Author: pag
Date: 2009-01-12 13:09:56 -0800 (Mon, 12 Jan 2009)
New Revision: 1430
Modified:
branches/xa11/src/jar/resolver-store/java/org/mulgara/store/statement/xa/TripleAVLFile.java
Log:
Fixed column mapping in MetaTuplesImpl to include the meta column
Modified: branches/xa11/src/jar/resolver-store/java/org/mulgara/store/statement/xa/TripleAVLFile.java
===================================================================
--- branches/xa11/src/jar/resolver-store/java/org/mulgara/store/statement/xa/TripleAVLFile.java 2009-01-12 21:07:00 UTC (rev 1429)
+++ branches/xa11/src/jar/resolver-store/java/org/mulgara/store/statement/xa/TripleAVLFile.java 2009-01-12 21:09:56 UTC (rev 1430)
@@ -413,7 +413,7 @@
* Inner class to compare two triples in an int buffer, using a given ordering
* for each of the node columns.
*/
- private final static class TripleComparator implements Comparator {
+ private final static class TripleComparator implements Comparator<Object> {
private int offset;
@@ -539,6 +539,7 @@
HEADER_SIZE + AVLFile.Phase.RECORD_SIZE +
ManagedBlockFile.Phase.RECORD_SIZE;
+ @SuppressWarnings("unused")
private final static int IDX_NR_FILE_TRIPLES = 0;
private long nrFileTriples;
@@ -977,7 +978,7 @@
node, node.getNextNode()
};
}
- int li = avlFile.leafIndex(findResult);
+ int li = AVLFile.leafIndex(findResult);
findResult[li].insert(newNode, 1 - li);
if (index == MAX_TRIPLES || index > splitPoint) {
@@ -1761,14 +1762,6 @@
this.endTriple = endTriple;
this.prefixLength = prefixLength;
- int nrColumns = SIZEOF_TRIPLE - prefixLength;
-
- // Set up a column order which moves the prefix columns to the end.
- columnMap = new int[nrColumns];
- for (int i = 0; i < nrColumns; ++i) {
- columnMap[i] = sortOrder[(i + prefixLength) % SIZEOF_TRIPLE];
- }
-
start = findTriple(startTriple);
end = findTriple(endTriple);
@@ -2259,8 +2252,13 @@
TuplesImpl(long[] startTriple, long[] endTriple, int prefixLength) throws IOException {
super(startTriple, endTriple, prefixLength);
int nrColumns = SIZEOF_TRIPLE - prefixLength;
+
variables = new Variable[nrColumns];
+ // Set up a column order which moves the prefix columns to the end.
+ columnMap = new int[nrColumns];
+
for (int i = 0; i < nrColumns; ++i) {
+ columnMap[i] = sortOrder[(i + prefixLength) % SIZEOF_TRIPLE];
variables[i] = StatementStore.VARIABLES[columnMap[i]];
}
@@ -2297,10 +2295,16 @@
super(startTriple, endTriple, prefixLength);
int nrColumns = SIZEOF_TRIPLE - prefixLength;
variables = new Variable[nrColumns + 1];
+
+ // Set up a column order which moves the prefix columns to the end.
+ columnMap = new int[nrColumns + 1];
+
for (int i = 0; i < nrColumns; ++i) {
+ columnMap[i] = sortOrder[(i + prefixLength) % SIZEOF_TRIPLE];
variables[i] = StatementStore.VARIABLES[columnMap[i]];
}
// make the last variable "Meta"
+ columnMap[nrColumns] = nrColumns;
variables[nrColumns] = StatementStore.VARIABLES[StatementStore.VARIABLES.length - 1];
metaNode = startTriple[order0];
}
More information about the Mulgara-svn
mailing list