@Test
  public void testTest2() throws IOException
  {
    final InputFormat inputFormat = new OrcInputFormat(
        new JSONPathSpec(
            true,
            Collections.singletonList(new JSONPathFieldSpec(JSONPathFieldType.PATH, "col7-subcol7", "$.col7.subcol7"))
        ),
        null,
        new Configuration()
    );
    final InputEntityReader reader = createReader(
        new TimestampSpec("timestamp", "auto", null),
        new DimensionsSpec(null),
        inputFormat,
        "example/test_2.orc"
    );
    try (CloseableIterator<InputRow> iterator = reader.read()) {
      Assert.assertTrue(iterator.hasNext());
      final InputRow row = iterator.next();
      Assert.assertEquals(DateTimes.of("2016-01-01T00:00:00.000Z"), row.getTimestamp());
      Assert.assertEquals("bar", Iterables.getOnlyElement(row.getDimension("col1")));
      Assert.assertEquals(ImmutableList.of("dat1", "dat2", "dat3"), row.getDimension("col2"));
      Assert.assertEquals("1.1", Iterables.getOnlyElement(row.getDimension("col3")));
      Assert.assertEquals("2", Iterables.getOnlyElement(row.getDimension("col4")));
      Assert.assertEquals("3.5", Iterables.getOnlyElement(row.getDimension("col5")));
      Assert.assertTrue(row.getDimension("col6").isEmpty());
      Assert.assertFalse(iterator.hasNext());
    }
  }
@Test
  public void testTest2() throws IOException
  {
    final InputFormat inputFormat = new OrcInputFormat(
        new JSONPathSpec(
            true,
            Collections.singletonList(new JSONPathFieldSpec(JSONPathFieldType.PATH, "col7-subcol7", "$.col7.subcol7"))
        ),
        null,
        new Configuration()
    );
    final InputEntityReader reader = createReader(
        new TimestampSpec("timestamp", "auto", null),
        new DimensionsSpec(null),
        inputFormat,
        "example/test_2.orc"
    );
    try (CloseableIterator<InputRow> iterator = reader.read()) {
      Assert.assertTrue(iterator.hasNext());
      final InputRow row = iterator.next();
      Assert.assertEquals(DateTimes.of("2016-01-01T00:00:00.000Z"), row.getTimestamp());
      Assert.assertEquals("bar", Iterables.getOnlyElement(row.getDimension("col1")));
      Assert.assertEquals(ImmutableList.of("dat1", "dat2", "dat3"), row.getDimension("col2"));
      Assert.assertEquals("1.1", Iterables.getOnlyElement(row.getDimension("col3")));
      Assert.assertEquals("2", Iterables.getOnlyElement(row.getDimension("col4")));
      Assert.assertEquals("3.5", Iterables.getOnlyElement(row.getDimension("col5")));
      Assert.assertTrue(row.getDimension("col6").isEmpty());
      Assert.assertFalse(iterator.hasNext());
    }
  }
@test public void testtest2() throws ioexception { final inputformat inputformat = new orcinputformat( new jsonpathspec( true, collections.singletonlist(new jsonpathfieldspec(jsonpathfieldtype.path, "col7-subcol7", "$.col7.subcol7")) ), null, new configuration() ); final inputentityreader reader = createreader( new timestampspec("timestamp", "auto", null), new dimensionsspec(null), inputformat, "example/test_2.orc" ); try (closeableiterator<inputrow> iterator = reader.read()) { assert.asserttrue(iterator.hasnext()); final inputrow row = iterator.next(); assert.assertequals(datetimes.of("2016-01-01t00:00:00.000z"), row.gettimestamp()); assert.assertequals("bar", iterables.getonlyelement(row.getdimension("col1"))); assert.assertequals(immutablelist.of("dat1", "dat2", "dat3"), row.getdimension("col2")); assert.assertequals("1.1", iterables.getonlyelement(row.getdimension("col3"))); assert.assertequals("2", iterables.getonlyelement(row.getdimension("col4"))); assert.assertequals("3.5", iterables.getonlyelement(row.getdimension("col5"))); assert.asserttrue(row.getdimension("col6").isempty()); assert.assertfalse(iterator.hasnext()); } }