Search in sources :

Example 6 with BTreeLeafFrameType

use of org.apache.hyracks.storage.am.btree.frames.BTreeLeafFrameType in project asterixdb by apache.

the class OrderedIndexTestDriver method twoIntKeys.

@Test
public void twoIntKeys() throws Exception {
    if (LOGGER.isLoggable(Level.INFO)) {
        LOGGER.info("BTree " + getTestOpName() + " Test With Two Int Keys.");
    }
    ISerializerDeserializer[] fieldSerdes = { IntegerSerializerDeserializer.INSTANCE, IntegerSerializerDeserializer.INSTANCE };
    // Range search in [50 0, 50 500]
    ITupleReference lowKey = TupleUtils.createIntegerTuple(50, 0);
    ITupleReference highKey = TupleUtils.createIntegerTuple(50, 500);
    // Prefix range search in [50, 50]
    ITupleReference prefixLowKey = TupleUtils.createIntegerTuple(50);
    ITupleReference prefixHighKey = TupleUtils.createIntegerTuple(50);
    for (BTreeLeafFrameType leafFrameType : leafFrameTypesToTest) {
        runTest(fieldSerdes, 2, leafFrameType, lowKey, highKey, prefixLowKey, prefixHighKey);
    }
}
Also used : ITupleReference(org.apache.hyracks.dataflow.common.data.accessors.ITupleReference) ISerializerDeserializer(org.apache.hyracks.api.dataflow.value.ISerializerDeserializer) BTreeLeafFrameType(org.apache.hyracks.storage.am.btree.frames.BTreeLeafFrameType) Test(org.junit.Test)

Aggregations

ISerializerDeserializer (org.apache.hyracks.api.dataflow.value.ISerializerDeserializer)6 ITupleReference (org.apache.hyracks.dataflow.common.data.accessors.ITupleReference)6 BTreeLeafFrameType (org.apache.hyracks.storage.am.btree.frames.BTreeLeafFrameType)6 Test (org.junit.Test)6 UTF8StringSerializerDeserializer (org.apache.hyracks.dataflow.common.data.marshalling.UTF8StringSerializerDeserializer)3