use of org.apache.ignite.internal.cache.query.index.sorted.keys.IntegerIndexKey in project ignite by apache.
the class InlineIndexKeyTypeRegistryTest method testObjectCheck.
/**
*/
@Test
public void testObjectCheck() {
InlineIndexKeyType t = InlineIndexKeyTypeRegistry.get(new IntegerIndexKey(3), IndexKeyTypes.JAVA_OBJECT, pojoArrayKeyTypeSettings);
assertEquals(IndexKeyTypes.INT, t.type());
t = InlineIndexKeyTypeRegistry.get(new PlainJavaObjectIndexKey(new BinaryObjectImpl(), null), IndexKeyTypes.JAVA_OBJECT, pojoArrayKeyTypeSettings);
assertEquals(IndexKeyTypes.JAVA_OBJECT, t.type());
t = InlineIndexKeyTypeRegistry.get(new PlainJavaObjectIndexKey(new BinaryObjectImpl(), null), IndexKeyTypes.INT, pojoArrayKeyTypeSettings);
assertEquals(IndexKeyTypes.JAVA_OBJECT, t.type());
t = InlineIndexKeyTypeRegistry.get(new IntegerIndexKey(3), IndexKeyTypes.JAVA_OBJECT, pojoHashKeyTypeSettings);
assertEquals(IndexKeyTypes.INT, t.type());
}
use of org.apache.ignite.internal.cache.query.index.sorted.keys.IntegerIndexKey in project ignite by apache.
the class InlineIndexKeyTypeRegistryTest method testMismatchType.
/**
*/
@Test
public void testMismatchType() {
InlineIndexKeyType t = InlineIndexKeyTypeRegistry.get(new IntegerIndexKey(3), 11, pojoArrayKeyTypeSettings);
assertEquals(IndexKeyTypes.INT, t.type());
}
Aggregations