-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Implement own df_n_col()
to avoid calling ncol()
(and dim()
)
#7049
Conversation
@krlmlr I've introduced our own version of We do still need to call For future us:
> dim.data.frame
function (x)
c(.row_names_info(x, 2L), length(x)) duckplyr does know the length of the data frame though, so we can utilize that.
Note that |
ncol()
to avoid calling dim()
df_n_col()
to avoid calling ncol()
(and dim()
)
Thanks for taking this on, Davis. I love the "for future us" bit! |
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.
Minor omission.
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.
LG!
This leads to premature materialization in
union_all()
and others with duckplyr 0.4.0 . I'll have to work around by vendoring everything that usesncol()
directly or indirectly into duckdb.