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

vec_match() should only use incomplete propagation with "data.frame"s #1386

Closed
DavisVaughan opened this issue Jun 4, 2021 · 0 comments · Fixed by #1404
Closed

vec_match() should only use incomplete propagation with "data.frame"s #1386

DavisVaughan opened this issue Jun 4, 2021 · 0 comments · Fixed by #1404

Comments

@DavisVaughan
Copy link
Member

i.e. with rcrd types that have a data frame proxy, it should require fully missing rows to be considered missing

> x <- new_rcrd(list(x = c(1, NA), y = c(NA_real_, NA_real_)))
> vec_match(x, x, na_equal = FALSE)
[1] NA NA
> vec_detect_complete(x)
[1]  TRUE FALSE

In this case, element 1 should still match, while element 2 should propagate an NA

This probably requires calling vec_detect_complete() up front on needles in the na_equal = FALSE case. Then replacing this dict_is_missing() call with if (!v_complete[i])

if (dict_is_missing(d_needles, i)) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant