-
Notifications
You must be signed in to change notification settings - Fork 66
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
Allow NULL
in vec_detect_complete()
#1916
Allow NULL
in vec_detect_complete()
#1916
Conversation
And better detect `NULL` columns and df-cols in data frames
} | ||
|
||
static inline | ||
void col_detect_complete_switch(SEXP x, R_len_t size, int* p_out) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a copy of vec_detect_complete_switch()
with different branches for data frames and NULL
It mirrors how we do it in vec_detect_missing()
vec_rank(NULL, incomplete = "na") | ||
Condition | ||
Error: | ||
! This type is not supported by `vec_order()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This used to throw the internal error seen in #1823
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not worth it but would be nice if:
- Argument name was reported
- Argument value was revealed
- Error happened earlier and mentioned
vec_rank()
- A
call
andarg
argument would allow callers to take ownersip of the type checking
vec_rank(NULL, incomplete = "na") | ||
Condition | ||
Error: | ||
! This type is not supported by `vec_order()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not worth it but would be nice if:
- Argument name was reported
- Argument value was revealed
- Error happened earlier and mentioned
vec_rank()
- A
call
andarg
argument would allow callers to take ownersip of the type checking
Closes #1823
And better detect
NULL
columns and df-cols in data frames