Skip to content

Conversation

@manmita
Copy link
Contributor

@manmita manmita commented Jan 5, 2026

Closes #2606

added 2 args to tables() one for shallow search and one to skip if the data.table is too big
if list_search is false then its the previous code
else we loop through list-like objects using is.list

added name for the nested list found
we skip list scanning beyond threshold

we merge to the nested list to the main list if found else it follows the old process

@manmita manmita marked this pull request as draft January 5, 2026 22:56
@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.92%. Comparing base (d6fb16c) to head (b4ca39e).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
R/tables.R 86.66% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7568      +/-   ##
==========================================
- Coverage   98.98%   98.92%   -0.07%     
==========================================
  Files          87       87              
  Lines       16729    16784      +55     
==========================================
+ Hits        16560    16603      +43     
- Misses        169      181      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

NEWS.md Outdated

1. `nafill()`, `setnafill()` extended to work on logical vectors (part of [#3992](https://github.com/Rdatatable/data.table/issues/3992)). Thanks @jangorecki for the request and @MichaelChirico for the PR.

2. `tables()` can now optionally report `data.table` objects stored one level deep inside list objects when `list_search=TRUE`, with `list_len_threshold` to avoid scanning extremely long lists, [#2606](https://github.com/Rdatatable/data.table/issues/2606).
Copy link
Member

@jangorecki jangorecki Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An example of when this new feature could be useful?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @jangorecki,

To support lists such as

list(data.table(a = 1, b = 4:6)),
      data.table(a = 2, b = 7:10))

which can occure due to split.data.table or fread .

The previous code supported only data.table() top level and this code adds support for list( data.table...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that if we dont want this search we can opt out for it maintaining backward compatiblity and performance as previous.

Copy link
Contributor Author

@manmita manmita Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jangorecki
Here is an example of previous and current versions

Reproducing the table() on list item and data.table

Image

Here are the results as mentioned it doesnt take list(data.table(..), data.table(..))

After the PR, adding list_search

Image

@manmita manmita requested a review from jangorecki January 6, 2026 19:08
@manmita manmita marked this pull request as ready for review January 6, 2026 19:09
@manmita manmita marked this pull request as draft January 8, 2026 00:28
ben-schwen and others added 4 commits January 9, 2026 02:14
…e#7259)

* allow showProgress=INTEGER to set progress bar update time

* add NEWS

* cleanup merge

* refine NEWS

* make check more explicit

* adjust docs

* adjust nocov to what they really should cover

* phrasing comment

Co-authored-by: Michael Chirico <[email protected]>

* Update NEWS.md

Co-authored-by: Michael Chirico <[email protected]>

* refine NEWS

* update man

* remove as.integer from signature

* remove unnecessary brackets

---------

Co-authored-by: Michael Chirico <[email protected]>
…#7572)

* fix(7571): bug fix for narm issue on gforce in int64 case

* fix(7571): test sequencing

* fix(7571): updated the NEWS.md

* trailing newline

* Use $V1

* fix(7571): added db optimize 2L

* refine NEWS

* fix(7571): add more tests and change to code similar to int for gsum

* fix(7571): added more tests for mean

* eliminate intermediate variable

* NEWS again

---------

Co-authored-by: Michael Chirico <[email protected]>
@manmita
Copy link
Contributor Author

manmita commented Jan 8, 2026

Will open another PR for the same from internal branch
Closing this

@manmita manmita closed this Jan 8, 2026
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.

tables could look for en-list-ed data.tables as well

4 participants