Skip to content

Commit 4bf69d8

Browse files
committed
address comments
1 parent ea1bb78 commit 4bf69d8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedParquetRecordReader.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ public boolean nextBatch() throws IOException {
251251
for (WritableColumnVector vector : columnVectors) {
252252
vector.reset();
253253
}
254+
columnarBatch.setNumRows(0);
254255
if (rowsReturned >= totalRowCount) return false;
255256
checkEndOfRowGroup();
256257

sql/core/src/main/java/org/apache/spark/sql/vectorized/ColumnarBatch.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
import org.apache.spark.sql.types.StructType;
2424

2525
/**
26-
* This class is a wrapper of multiple ColumnVectors and represents a table. It provides a row-view
27-
* of this batch so that Spark can access the data row by row. Instance of it is meant to be reused
28-
* during the entire data loading process.
26+
* This class is a wrapper of multiple ColumnVectors and represents a logical table-like data
27+
* structure. It provides a row-view of this batch so that Spark can access the data row by row.
28+
* Instance of it is meant to be reused during the entire data loading process.
2929
*/
3030
public final class ColumnarBatch {
3131
public static final int DEFAULT_BATCH_SIZE = 4 * 1024;

0 commit comments

Comments
 (0)