diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedParquetRecordReader.java b/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedParquetRecordReader.java index 699de59..30af42c 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedParquetRecordReader.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedParquetRecordReader.java @@ -82,7 +82,7 @@ /** * The number of rows that have been returned. */ - private long rowsReturned; + private long rowsReturned = 0; /** * The number of rows that have been reading, including the current in flight row group. @@ -93,7 +93,7 @@ * The total number of rows this RecordReader will eventually read. The sum of the * rows of all the row groups. */ - protected long totalRowCount; + protected long totalRowCount = 0; @VisibleForTesting public VectorizedParquetRecordReader( @@ -129,6 +129,8 @@ public VectorizedParquetRecordReader( public void initialize( InputSplit oldSplit, JobConf configuration) throws IOException, InterruptedException { + // the oldSplit may be null during the split phase + if (oldSplit == null) return; jobConf = configuration; ParquetMetadata footer; List blocks;