assertEquals( indexedPositions.length,
betaConstraints.getIndexCount() );
BetaMemory betaMemory = betaConstraints.createBetaMemory( config );
if ( indexedPositions.length > 0 ) {
TupleIndexHashTable tupleHashTable = (TupleIndexHashTable) betaMemory.getTupleMemory();
assertTrue( tupleHashTable.isIndexed() );
Index index = tupleHashTable.getIndex();
for ( int i = 0; i < indexedPositions.length; i++ ) {
checkSameConstraintForIndex( constraints[indexedPositions[i]],
index.getFieldIndex( i ) );
}
FactHandleIndexHashTable factHashTable = (FactHandleIndexHashTable) betaMemory.getFactHandleMemory();
assertTrue( factHashTable.isIndexed() );
index = factHashTable.getIndex();
for ( int i = 0; i < indexedPositions.length; i++ ) {
checkSameConstraintForIndex( constraints[indexedPositions[i]],
index.getFieldIndex( i ) );
}
} else {
TupleHashTable tupleHashTable = (TupleHashTable) betaMemory.getTupleMemory();
assertFalse( tupleHashTable.isIndexed() );
FactHashTable factHashTable = (FactHashTable) betaMemory.getFactHandleMemory();
assertFalse( factHashTable.isIndexed() );
}
}