You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by bl...@apache.org on 2019/09/03 21:33:42 UTC
[incubator-iceberg] branch vectorized-read updated: Fix the illegal
state check (#441)
This is an automated email from the ASF dual-hosted git repository.
blue pushed a commit to branch vectorized-read
in repository https://gitbox.apache.org/repos/asf/incubator-iceberg.git
The following commit(s) were added to refs/heads/vectorized-read by this push:
new 9ba7af2 Fix the illegal state check (#441)
9ba7af2 is described below
commit 9ba7af25a1742cb0e4c9879224e27311a35a6708
Author: Samarth Jain <sa...@apache.org>
AuthorDate: Tue Sep 3 14:33:37 2019 -0700
Fix the illegal state check (#441)
---
.../main/java/org/apache/iceberg/parquet/ColumnarBatchReader.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/parquet/src/main/java/org/apache/iceberg/parquet/ColumnarBatchReader.java b/parquet/src/main/java/org/apache/iceberg/parquet/ColumnarBatchReader.java
index b3ecbee..5363db8 100644
--- a/parquet/src/main/java/org/apache/iceberg/parquet/ColumnarBatchReader.java
+++ b/parquet/src/main/java/org/apache/iceberg/parquet/ColumnarBatchReader.java
@@ -45,9 +45,11 @@ public class ColumnarBatchReader implements BatchedReader{
FieldVector vec = readers[i].read();
arrowVectorArr[i] = new ArrowColumnVector(vec);
- Preconditions.checkState(i > 0 && numRows == vec.getValueCount(),
+ if (i > 0) {
+ Preconditions.checkState(numRows == vec.getValueCount(),
"Different number of values returned by readers for columns: " +
- readers[i-1] + " and " + readers[i]);
+ readers[i - 1] + " and " + readers[i]);
+ }
numRows = vec.getValueCount();
}