nealrichardson commented on code in PR #43895:
URL: https://github.com/apache/arrow/pull/43895#discussion_r1740112600
##########
r/R/metadata.R:
##########
@@ -107,7 +107,9 @@ safe_r_metadata <- function(metadata, on_save = FALSE) {
# and mutate the `types_removed` variable outside of it.
check_r_metadata_types_recursive <- function(x) {
allowed_types <- c("character", "double", "integer", "logical", "complex",
"list", "NULL")
- if (is.list(x)) {
+ # Add special handling for numeric_version, which is list but its
+ # [[ method leads to infinite recursion
+ if (is.list(x) && !inherits(x, "numeric_version")) {
Review Comment:
Actually it's worse:
```suggestion
# Add special handling for some base R classes that are list but
# their [[ methods leads to infinite recursion
if (is.list(x) && !inherits(x, c("numeric_version", "POSIXlt"))) {
```
--
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]