Skip to content

Commit aab2f81

Browse files
Yash DattaYash Datta
authored andcommitted
PARQUET-161: Review comments for the test case
1 parent 2217ee2 commit aab2f81

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

parquet-hadoop/src/test/java/parquet/hadoop/TestParquetFileWriter.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -339,14 +339,11 @@ public void testWriteReadStatisticsAllNulls() throws Exception {
339339
writer.close();
340340

341341
ParquetMetadata readFooter = ParquetFileReader.readFooter(configuration, path);
342-
for (BlockMetaData block : readFooter.getBlocks()) {
343-
for (ColumnChunkMetaData col : block.getColumns()) {
344-
col.getPath();
345-
}
346-
}
347-
{ // assert the number of nulls are correct for the first block
348-
assertEquals(1, (readFooter.getBlocks().get(0).getColumns().get(0).getStatistics().getNumNulls()));
349-
}
342+
343+
// assert the statistics object is not empty
344+
assertTrue((readFooter.getBlocks().get(0).getColumns().get(0).getStatistics().isEmpty()) == false);
345+
// assert the number of nulls are correct for the first block
346+
assertEquals(1, (readFooter.getBlocks().get(0).getColumns().get(0).getStatistics().getNumNulls()));
350347
}
351348

352349
private void validateFooters(final List<Footer> metadata) {

0 commit comments

Comments
 (0)