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

Make C level `vec_proxy_equal()` recursive by default #641

Closed
DavisVaughan opened this issue Nov 1, 2019 · 4 comments · Fixed by #693
Closed

Make C level `vec_proxy_equal()` recursive by default #641

DavisVaughan opened this issue Nov 1, 2019 · 4 comments · Fixed by #693

Comments

@DavisVaughan
Copy link
Collaborator

@DavisVaughan DavisVaughan commented Nov 1, 2019

See #636 (review)

It is not currently used non-recursively anywhere anymore, so we might not even need vec_proxy_equal_shallow().

@lionel-

This comment has been minimized.

Copy link
Member

@lionel- lionel- commented Nov 28, 2019

It seems like the R level vec_proxy() should also be recursive. And then restoration as well.

@lionel-

This comment has been minimized.

Copy link
Member

@lionel- lionel- commented Nov 28, 2019

E.g. there might be a grouped-df column whose group indices need to be restored after slicing.

lionel- added a commit to lionel-/vctrs that referenced this issue Nov 28, 2019
lionel- added a commit to lionel-/vctrs that referenced this issue Nov 28, 2019
@lionel-

This comment has been minimized.

Copy link
Member

@lionel- lionel- commented Nov 28, 2019

oops vec_proxy() cannot be recursive because vec_restore() cannot be recursive. We can't restore recursively since the number of columns or their contents might change.

It's possible vec-proxy and vec-proxy-equal are in fact unrelated concepts.

@lionel-

This comment was marked as off-topic.

Copy link
Member

@lionel- lionel- commented Nov 29, 2019

vec_proxy_compare() also needs some clean up

test <- new_data_frame(n = 2L)
test$x <- new_data_frame(list(y = matrix(1:2, 2)))
vec_proxy_compare(test)
#>   V1
#> 1  1
#> 2  2

test$x <- tibble::tibble(y = matrix(1:2, 2))
vec_proxy_compare(test)
#> Error: No common type for `..1$y` <data.frame<V1:integer>> and `..2$y` <integer[,1]>.
lionel- added a commit to lionel-/vctrs that referenced this issue Dec 2, 2019
@lionel- lionel- closed this in #693 Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.