assertEquals( indexedPositions.length,
betaConstraints.getIndexCount() );
BetaMemory betaMemory = betaConstraints.createBetaMemory( config );
if ( indexedPositions.length > 0 ) {
LeftTupleIndexHashTable tupleHashTable = (LeftTupleIndexHashTable) betaMemory.getLeftTupleMemory();
assertTrue( tupleHashTable.isIndexed() );
Index index = tupleHashTable.getIndex();
for ( int i = 0; i < indexedPositions.length; i++ ) {
checkSameConstraintForIndex( constraints[indexedPositions[i]],
index.getFieldIndex( i ) );
}
RightTupleIndexHashTable factHashTable = (RightTupleIndexHashTable) betaMemory.getRightTupleMemory();
assertTrue( factHashTable.isIndexed() );
index = factHashTable.getIndex();
for ( int i = 0; i < indexedPositions.length; i++ ) {
checkSameConstraintForIndex( constraints[indexedPositions[i]],
index.getFieldIndex( i ) );
}
} else {
LeftTupleList tupleHashTable = (LeftTupleList) betaMemory.getLeftTupleMemory();
assertFalse( tupleHashTable.isIndexed() );
RightTupleList factHashTable = (RightTupleList) betaMemory.getRightTupleMemory();
assertFalse( factHashTable.isIndexed() );
}
}