nealrichardson commented on a change in pull request #8579:
URL: https://github.com/apache/arrow/pull/8579#discussion_r521631559



##########
File path: r/R/table.R
##########
@@ -254,6 +257,68 @@ names.Table <- function(x) x$ColumnNames()
 #' @export
 `[[.Table` <- `[[.RecordBatch`
 
+#' @export
+`[[<-.Table` <- function(x, i, value) {
+  if (!is.character(i) & !is.numeric(i)) {
+    stop("'i' must be character or numeric, not ", class(i), call. = FALSE)
+  } else if (is.na(i)) {
+    # Catch if a NA_character or NA_integer is passed. These are caught 
elsewhere
+    # in cpp (i.e. _arrow_RecordBatch__column_name)
+    # TODO: figure out if catching in cpp like ^^^ is preferred

Review comment:
       I suspect that error comes from 
https://github.com/apache/arrow/pull/8579/files#diff-242f7f20fb4999f3bbe719d6977d2580231b89334326b588d46e9236c2e28fcdR285,
 i.e. before we hit cpp.




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

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


Reply via email to