private void evaluateDerivedJoin(ExecutionContext context, CompiledValue newLeftSide, CompiledValue newRightSide, int operator) throws TypeMismatchException, FunctionDomainException, NameResolutionException, QueryInvocationTargetException { CompiledComparison dcc = createDerivedJoin(context, newLeftSide, newRightSide, operator); IndexInfo[] indexInfos = (IndexInfo[]) dcc.getIndexInfo(context); try { if (indexInfos != null && isValidIndexTypeToDerive(indexInfos[0]._getIndex())) { populateDerivedResultsFromDerivedJoin(context, dcc, indexInfos[0]); } } finally { if (indexInfos != null) { Index index = (Index) indexInfos[0]._index; Index prIndex = ((AbstractIndex) index).getPRIndex(); if (prIndex != null) { ((PartitionedIndex) prIndex).releaseIndexReadLockForRemove(); } else { ((AbstractIndex) index).releaseIndexReadLockForRemove(); } } } }