lidavidm commented on code in PR #14382:
URL: https://github.com/apache/arrow/pull/14382#discussion_r993842724


##########
docs/source/java/dataset.rst:
##########
@@ -228,3 +250,25 @@ native objects after using. For example:
     AutoCloseables.close(factory, dataset, scanner);
 
 If user forgets to close them then native object leakage might be caused.
+
+Development Guidelines
+======================
+
+* Related to the note about ScanOptions batchSize argument: Let's try to read 
a Parquet file with gzip compression and 3 row groups:
+
+    .. code-block::
+
+       # Let configure ScanOptions as:
+       ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+
+       $ parquet-tools meta data4_3rg_gzip.parquet
+       file schema: schema
+       age:         OPTIONAL INT64 R:0 D:1
+       name:        OPTIONAL BINARY L:STRING R:0 D:1
+       row group 1: RC:4 TS:182 OFFSET:4
+       row group 2: RC:4 TS:190 OFFSET:420
+       row group 3: RC:3 TS:179 OFFSET:838
+
+    In this case, we are configuring ScanOptions batchSize argument equals to

Review Comment:
   32768 isn't a request for rows, it's a limit. Since the file only has 4 rows 
in in the first row group, the actual batch size will be 4. If the file had 
more than 32768 rows, then it would get split into blocks of 32768 rows or less.



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to