ateucher commented on code in PR #13336:
URL: https://github.com/apache/arrow/pull/13336#discussion_r893908380
##########
r/R/dplyr.R:
##########
@@ -24,6 +24,21 @@ arrow_dplyr_query <- function(.data) {
# RecordBatch, or Dataset) and the state of the user's dplyr query--things
# like selected columns, filters, and group vars.
# An arrow_dplyr_query can contain another arrow_dplyr_query in .data
+
+ supported <- c(
+ "Dataset", "RecordBatch", "RecordBatchReader",
+ "Table", "arrow_dplyr_query", "data.frame"
+ )
+ if (!inherits(.data, supported)) {
+ stop(
+ "'dataset' must be a ",
Review Comment:
Unfortunately I don't think `substitute(.data, parent.frame())` (or a
variation thereof) is going to be very reliable, as it gives the name of the
object passed to the argument in the calling function, not the formal name of
the argument. I think it may be easiest to just not name the input. Maybe
something like "You must supply a Dataset, RecordBatch..., not a ..."?
--
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]