/** * Advances to the next batch of rows. Returns false if there are no more. */ public boolean nextBatch() throws IOException { columnarBatch.reset(); if (rowsReturned >= totalRowCount) return false; checkEndOfRowGroup(); int num = (int) Math.min((long) columnarBatch.capacity(), totalCountLoadedSoFar - rowsReturned); for (int i = 0; i < columnReaders.length; ++i) { if (columnReaders[i] == null) continue; columnReaders[i].readBatch(num, columnarBatch.column(i)); } rowsReturned += num; columnarBatch.setNumRows(num); numBatched = num; batchIdx = 0; return true; }
/** * Returns the number of rows for read, including filtered rows. */ public int numRows() { return columnarBatch.capacity(); }
columnarBatch.column(i).putNulls(0, columnarBatch.capacity()); columnarBatch.column(i).setIsConstant();
/** * Advances to the next batch of rows. Returns false if there are no more. */ public boolean nextBatch() throws IOException { columnarBatch.reset(); if (rowsReturned >= totalRowCount) return false; checkEndOfRowGroup(); int num = (int) Math.min((long) columnarBatch.capacity(), totalCountLoadedSoFar - rowsReturned); for (int i = 0; i < columnReaders.length; ++i) { if (columnReaders[i] == null) continue; columnReaders[i].readBatch(num, columnarBatch.column(i)); } rowsReturned += num; columnarBatch.setNumRows(num); numBatched = num; batchIdx = 0; return true; }
columnarBatch.column(i).putNulls(0, columnarBatch.capacity()); columnarBatch.column(i).setIsConstant();