You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/11 21:40:00 UTC

[GitHub] [arrow] ianmcook opened a new pull request #9168: ARROW-10834: [R] Fix print method for SubTreeFileSystem

ianmcook opened a new pull request #9168:
URL: https://github.com/apache/arrow/pull/9168


   This PR modifies ``` `$.SubTreeFileSystem` ``` to return `NULL` if the named object is not found in the object. This allows the `print()` method of `ArrowObject` to print `SubTreeFileSystem` objects without error.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] ianmcook commented on a change in pull request #9168: ARROW-10834: [R] Fix print method for SubTreeFileSystem

Posted by GitBox <gi...@apache.org>.
ianmcook commented on a change in pull request #9168:
URL: https://github.com/apache/arrow/pull/9168#discussion_r555361025



##########
File path: r/R/filesystem.R
##########
@@ -418,10 +418,12 @@ SubTreeFileSystem$create <- function(base_path, base_fs = NULL) {
 `$.SubTreeFileSystem` <- function(x, name, ...) {
   # This is to allow delegating methods/properties to the base_fs
   assert_that(is.string(name))
-  if (name %in% ls(x)) {
+  if (name %in% ls(envir = x)) {
     get(name, x)
-  } else {
+  } else if (name %in% ls(envir = x$base_fs)) {
     get(name, x$base_fs)
+  } else {
+    NULL

Review comment:
       Using `envir` in these `ls()` calls stops this cryptic warning from being issued when the external pointer breaks:
   ```
   In addition: Warning message:
   In ls(x$base_fs) : ‘x$base_fs’ converted to character string
   ```
   That warning comes from a part of the code in `ls()` that doesn't run if you pass the object as `envir`.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] nealrichardson closed pull request #9168: ARROW-10834: [R] Fix print method for SubTreeFileSystem

Posted by GitBox <gi...@apache.org>.
nealrichardson closed pull request #9168:
URL: https://github.com/apache/arrow/pull/9168


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #9168: ARROW-10834: [R] Fix print method for SubTreeFileSystem

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #9168:
URL: https://github.com/apache/arrow/pull/9168#issuecomment-758288034


   https://issues.apache.org/jira/browse/ARROW-10834


----------------------------------------------------------------
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:
users@infra.apache.org