thisisnic commented on code in PR #51392:
URL: https://github.com/apache/arrow/pull/51392#discussion_r4082452841
##########
r/R/dplyr-funcs-augmented.R:
##########
@@ -18,27 +18,42 @@
#' Add the data filename as a column
#'
#' This function only exists inside `arrow` `dplyr` queries, and it only is
-#' valid when querying on a `FileSystemDataset`.
+#' valid when querying on a `FileSystemDataset`, such as one created by
+#' [open_dataset()]. Use it inside `mutate()` to add a column holding the path
+#' of the file each row was read from.
#'
-#' To use filenames generated by this function in subsequent pipeline steps,
you
-#' must either call \code{\link[dplyr:compute]{compute()}} or
-#' \code{\link[dplyr:collect]{collect()}} first. See Examples.
+#' The filename column can be used in later `select()`, `arrange()` and
+#' `group_by()` steps of the same query. However, it can't be used in
+#' `filter()`, and some functions (such as `substr()`) are not supported on it.
+#' In these cases, call \code{\link[dplyr:compute]{compute()}} or
+#' \code{\link[dplyr:collect]{collect()}} first. `add_filename()` must also be
Review Comment:
Good point, have updated
--
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]