Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-10834: [R] Fix print method for SubTreeFileSystem #9168

Closed
wants to merge 1 commit into from

Conversation

ianmcook
Copy link
Member

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.

Comment on lines -421 to +426
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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions
Copy link

GeorgeAp pushed a commit to sirensolutions/arrow that referenced this pull request Jun 7, 2021
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.

Closes apache#9168 from ianmcook/ARROW-10834

Authored-by: Ian Cook <ianmcook@gmail.com>
Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants