thisisnic commented on code in PR #34340:
URL: https://github.com/apache/arrow/pull/34340#discussion_r1118616783


##########
r/R/csv.R:
##########
@@ -385,7 +385,13 @@ CsvTableReader$create <- function(file,
 #'
 #' `CsvReadOptions$create()` further accepts these additional arguments:
 #'
-#' - `skip_rows` Number of lines to skip before reading data (default 0)
+#' - `skip_rows` Number of lines to skip before reading data (default 0).
+#' - `skip_rows_after_names` Number of lines to skip after the column names 
(default 0).
+#' This number can be larger than the number of rows in one block, and empty 
rows are counted.
+#' The order of application is as follows:
+#'   - `skip_rows` is applied (if non-zero);
+#'   - column names aread (unless `column_names` is set);
+#'   - `skip_rows_after_names` is applied (if non-zero).

Review Comment:
   ```suggestion
   #' - `skip_rows_after_names` Number of lines to skip after the column names 
(default 0).
   #'    This number can be larger than the number of rows in one block, and 
empty rows are counted.
   #'    The order of application is as follows:
   #'      - `skip_rows` is applied (if non-zero);
   #'      - column names are read (unless `column_names` is set);
   #'      - `skip_rows_after_names` is applied (if non-zero).
   ```



##########
r/R/csv.R:
##########
@@ -467,6 +473,7 @@ CsvReadOptions <- R6Class("CsvReadOptions",
 CsvReadOptions$create <- function(use_threads = option_use_threads(),
                                   block_size = 1048576L,
                                   skip_rows = 0L,
+                                  skip_rows_after_names = 0L,

Review Comment:
   Might it be better to add new parameters at the end of the list, so that 
this won't break code of users who are already using `CsvReadOptions$create()` 
and passing in parameters without names?



-- 
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