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

Allow NULL in vec_detect_complete() #1916

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

DavisVaughan
Copy link
Member

Closes #1823

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) {
Copy link
Member Author

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()`.
Copy link
Member Author

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

Copy link
Member

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 and arg 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()`.
Copy link
Member

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 and arg argument would allow callers to take ownersip of the type checking

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 this pull request may close these issues.

Error in vec_rank()
2 participants