private boolean nextBatch ( ) throws IOException { recordReader . nextBatch ( wrap . batch ( ) ) ; int batchSize = wrap . batch ( ) . size ; if ( batchSize == 0 ) { return false ; } columnarBatch . setNumRows ( batchSize ) ; for ( int i = 0 ; i < requiredFields . length ; i ++ ) { if ( requestedDataColIds [ i ] != - 1 ) { ( ( OrcColumnVector ) orcVectorWrappers [ i ] ) . setBatchSize ( batchSize ) ; } } return true ; }
Return true if there exists more data in the next batch . If exists prepare the next batch by copying from ORC VectorizedRowBatch columns to Spark ColumnarBatch columns .