You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inconsistent replacement of list column element with NULL in table with 1 row #5558
changed the title [-]can not replace list column element with NULL in table with 1 row[/-][+]Inconsistent replacement of list column element with NULL in table with 1 row[/+]on Dec 9, 2022
* Stable code base (strong preference for user-friendly back-compatibility with data.table itself and with old versions of R)
If we decide the new approach landed on in #6167 is preferable, or that it unlocks a behavior that was previously impossible, we should re-introduce #6167 gradually with a deprecation cycle. Here's my proposal:
1.17.0: Leave Consistent Replacement of List Column with NULL #6167, but hide it behind if (!isTRUE(getOption("datatable.old.list.assignment", FALSE))) { ... }, document option and intention to change defaults from the next release
FYI, I'll plan to do a cherry-pick style revert instead of a simple clean one -- I think the test suite in the PR is really great, and of utility even if the exact behavior tested needs to change slightly.
so this is definitely impossible to do in a backwards compatible way.
and backwards compatible is more important than consistency, which suggests that we may just close and live with this inconsistency.
it seems to be an unusual use case, so I will close for now.
Activity
avimallu commentedon Dec 8, 2022
I can do this:
that works, but oddly not
which should be identical per
data.tabledocumentation.[-]can not replace list column element with NULL in table with 1 row[/-][+]Inconsistent replacement of list column element with NULL in table with 1 row[/+]MichaelChirico commentedon Jan 20, 2025
The fix here, #6167, caused a regression: #6740 / markfairbanks/tidytable#831.
In line with the GOVERNANCE rules I think we should revert #6167, at least for now and at least by default:
data.table/GOVERNANCE.md
Line 17 in 3a7ec2d
If we decide the new approach landed on in #6167 is preferable, or that it unlocks a behavior that was previously impossible, we should re-introduce #6167 gradually with a deprecation cycle. Here's my proposal:
1.17.0: Leave Consistent Replacement of List Column with NULL #6167, but hide it behindif (!isTRUE(getOption("datatable.old.list.assignment", FALSE))) { ... }, document option and intention to change defaults from the next release1.18.0: Change option default toTRUE1.19.0: Throw awarningforFALSEoption1.20.0: Throw anerrorforFALSEoption1.21.0: Ignore option, throw warning if it is set1.22.0: Ignore option, throw error if it is set1.23.0: Remove option totallytdhock commentedon Jan 21, 2025
related: #6732
tdhock commentedon Jan 21, 2025
sure let's revert.
and reopen this issue.
MichaelChirico commentedon Jan 21, 2025
FYI, I'll plan to do a cherry-pick style revert instead of a simple clean one -- I think the test suite in the PR is really great, and of utility even if the exact behavior tested needs to change slightly.
joshhwuu commentedon Oct 14, 2025
@tdhock @MichaelChirico bringing attention back to this in lieu of 1.18.0 😄, have we determined that this new approach is still worth pursuing?
tdhock commentedon Mar 31, 2026
so this is definitely impossible to do in a backwards compatible way.
and backwards compatible is more important than consistency, which suggests that we may just close and live with this inconsistency.
it seems to be an unusual use case, so I will close for now.