diff --git ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcFile.java ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcFile.java index 7f9b615..8cb51b0 100644 --- ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcFile.java +++ ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcFile.java @@ -187,10 +187,11 @@ private static BytesWritable bytes(int... items) { } private static ByteBuffer byteBuf(int... items) { - ByteBuffer result = ByteBuffer.allocate(items.length); + ByteBuffer result = ByteBuffer.allocate(items.length); for(int item: items) { result.put((byte) item); } + result.flip(); return result; } @@ -703,12 +704,12 @@ public void testStripeLevelStats() throws Exception { assertEquals(0, items.get(0).getPositions(0)); assertEquals(0, items.get(0).getPositions(1)); assertEquals(0, items.get(0).getPositions(2)); - assertEquals(1, + assertEquals(1, items.get(0).getStatistics().getIntStatistics().getMinimum()); index = recordReader.readRowIndex(1, null, null).getRowGroupIndex(); assertEquals(3, index.length); items = index[1].getEntryList(); - assertEquals(2, + assertEquals(2, items.get(0).getStatistics().getIntStatistics().getMaximum()); }