use of com.hazelcast.query.impl.IndexImpl in project hazelcast by hazelcast.
the class LikePredicateTest method createIndex.
@Nonnull
private Index createIndex(IndexType indexType) {
InternalSerializationService mockSerializationService = mock(InternalSerializationService.class);
Extractors mockExtractors = Extractors.newBuilder(mockSerializationService).build();
IndexConfig config = IndexUtils.createTestIndexConfig(indexType, "this");
return new IndexImpl(config, mockSerializationService, mockExtractors, IndexCopyBehavior.COPY_ON_READ, PerIndexStats.EMPTY, MemberPartitionStateImpl.DEFAULT_PARTITION_COUNT);
}
use of com.hazelcast.query.impl.IndexImpl in project hazelcast by hazelcast.
the class PredicatesTest method testNotEqualsPredicateDoesNotUseIndex.
@Test
public void testNotEqualsPredicateDoesNotUseIndex() {
Index dummyIndex = new IndexImpl("foo", false, ss, Extractors.empty());
QueryContext mockQueryContext = mock(QueryContext.class);
when(mockQueryContext.getIndex(anyString())).thenReturn(dummyIndex);
NotEqualPredicate p = new NotEqualPredicate("foo", "bar");
boolean indexed = p.isIndexed(mockQueryContext);
assertFalse(indexed);
}
Aggregations