Search in sources :

Example 1 with NanoTime

use of org.apache.parquet.example.data.simple.NanoTime in project parquet-mr by apache.

the class ValidatingColumnWriteStore method testOneOfEach.

@Test
public void testOneOfEach() {
    MessageType oneOfEachSchema = MessageTypeParser.parseMessageType(oneOfEach);
    GroupFactory gf = new SimpleGroupFactory(oneOfEachSchema);
    Group g1 = gf.newGroup().append("a", 1l).append("b", 2).append("c", 3.0f).append("d", 4.0d).append("e", true).append("f", Binary.fromString("6")).append("g", new NanoTime(1234, System.currentTimeMillis() * 1000)).append("h", Binary.fromString("abc"));
    testSchema(oneOfEachSchema, Arrays.asList(g1));
}
Also used : NanoTime(org.apache.parquet.example.data.simple.NanoTime) Group(org.apache.parquet.example.data.Group) SimpleGroupFactory(org.apache.parquet.example.data.simple.SimpleGroupFactory) GroupFactory(org.apache.parquet.example.data.GroupFactory) SimpleGroupFactory(org.apache.parquet.example.data.simple.SimpleGroupFactory) MessageType(org.apache.parquet.schema.MessageType) Test(org.junit.Test)

Aggregations

Group (org.apache.parquet.example.data.Group)1 GroupFactory (org.apache.parquet.example.data.GroupFactory)1 NanoTime (org.apache.parquet.example.data.simple.NanoTime)1 SimpleGroupFactory (org.apache.parquet.example.data.simple.SimpleGroupFactory)1 MessageType (org.apache.parquet.schema.MessageType)1 Test (org.junit.Test)1