Search in sources :

Example 16 with MaxKey

use of org.bson.types.MaxKey in project mongo-hadoop by mongodb.

the class UDFTest method testMinMaxKey.

@Test
public void testMinMaxKey() throws IOException, ParseException {
    PigTest.runScript("/pig/genminmaxkeys.pig");
    for (Document doc : OUTPUT_COLLECTION.find()) {
        assertTrue(doc.get("newMin") instanceof MinKey);
        assertTrue(doc.get("newMax") instanceof MaxKey);
    }
}
Also used : MinKey(org.bson.types.MinKey) MaxKey(org.bson.types.MaxKey) Document(org.bson.Document) Test(org.junit.Test)

Aggregations

MaxKey (org.bson.types.MaxKey)16 MinKey (org.bson.types.MinKey)16 Binary (org.bson.types.Binary)8 Date (java.util.Date)7 Document (org.bson.Document)7 Code (org.bson.types.Code)7 ObjectId (org.bson.types.ObjectId)7 Test (org.junit.Test)6 ArrayList (java.util.ArrayList)5 BSONTimestamp (org.bson.types.BSONTimestamp)5 CodeWScope (org.bson.types.CodeWScope)5 DBRef (com.mongodb.DBRef)4 List (java.util.List)4 Map (java.util.Map)3 BasicDBObject (com.mongodb.BasicDBObject)2 DBObject (com.mongodb.DBObject)2 ServerAddress (com.mongodb.ServerAddress)2 MongoDatabase (com.mongodb.client.MongoDatabase)2 String (java.lang.String)2 SimpleDateFormat (java.text.SimpleDateFormat)2