-
Notifications
You must be signed in to change notification settings - Fork 1k
Added shallow search for data.table in tables() #7580
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
base: master
Are you sure you want to change the base?
Conversation
…o feat/adding_list_search_to_tables
|
Hello, I created a new PR in replacement of #7568 Reasons: There was some git issue there and the merge became too complex and I changed the algo because I didnt know previously that rbind or cbind would cost for re-allocation The current PR considers that part and avoids appends Previous PR : creating seperate data.table called info and rbind at the end |
|
In reply to previous comment of @jangorecki An example of when this new feature could be useful? To support lists which occur due to split.data.table or fread like the following The original code supported data.table() top level and this code adds support for list(data.table) if the arg |
|
Example of the original code and the new feature is as follows
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7580 +/- ##
=======================================
Coverage 99.02% 99.02%
=======================================
Files 87 87
Lines 16754 16793 +39
=======================================
+ Hits 16591 16630 +39
Misses 163 163 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
No obvious timing issues in HEAD=feat/adding_list_search_to_tables Generated via commit 1952290 Download link for the artifact containing the test results: ↓ atime-results.zip
|

Closes #2606
added arg
shallow_search = TRUEto tables() one for shallow searchif
shallow_searchis false then its the previous codeelse we loop through list-like objects using is.list and which are not data.table or data.frame
added name for the nested list found
parent[[1]]orparent$childpre-allocating info to avoid reallocation cost