davisusanibar commented on a change in pull request #136:
URL: https://github.com/apache/arrow-cookbook/pull/136#discussion_r808070947



##########
File path: java/source/io.rst
##########
@@ -457,18 +504,19 @@ Read - From File
     ){
         // write
         writer.start();
-        for (int i=0; i<10; i++){
+        for (int i=0; i<2; i++){
             // Generate data or modify the root or use a VectorLoader to get 
fresh data from somewhere else
             writer.writeBatch();
         }
 
         // read
         try (FileInputStream fileInputStreamForStream = new 
FileInputStream(file);
              ArrowStreamReader reader = new 
ArrowStreamReader(fileInputStreamForStream, rootAllocator)){
-            // read the batch
-            reader.loadNextBatch();
-            VectorSchemaRoot vectorSchemaRootRecover = 
reader.getVectorSchemaRoot();
-            System.out.print(vectorSchemaRootRecover.contentToTSVString());
+            while(reader.loadNextBatch()){
+                // read the batch (on the next example you could see how to 
use a VectorLoader to get fresh data)

Review comment:
       Deleted and added a separate recipe to demonstrate 
VectorLoader/VectorUnloader.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to