You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/13 20:09:15 UTC

[GitHub] [arrow-cookbook] davisusanibar commented on a diff in pull request #207: [Java] Parquet reading example fails with Arrow v8.0

davisusanibar commented on code in PR #207:
URL: https://github.com/apache/arrow-cookbook/pull/207#discussion_r872755453


##########
java/source/dataset.rst:
##########
@@ -224,11 +240,19 @@ Consider that we have these files: data1: 3 rows, data2: 3 rows and data3: 250 r
         scanner.scan().forEach(scanTask-> {
             VectorLoader loader = new VectorLoader(vsr);
             final int[] count = {1};
-            scanTask.execute().forEachRemaining(arrowRecordBatch -> {
-                loader.load(arrowRecordBatch);
-                System.out.println("Batch: " + count[0]++ + ", RowCount: " + vsr.getRowCount());
-                arrowRecordBatch.close();
-            });
+            try(ArrowReader reader = scanTask.execute()){

Review Comment:
   Thank you @toddfarmer, changed lots of places.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org