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

rbindlist works for expression column #3811

Merged
merged 3 commits into from
Dec 20, 2019
Merged

rbindlist works for expression column #3811

merged 3 commits into from
Dec 20, 2019

Conversation

MichaelChirico
Copy link
Member

Closes #546

Seems we shouldn't go too far down the path of allowing expression columns but the fix here is quite simple/easy to follow.

Copy link
Member

@jangorecki jangorecki left a comment

Choose a reason for hiding this comment

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

I have no idea if anyone will find it useful, @Rdatatable/project-members?. IMO better to restrict data.table column type. Matrix cannot be a column directly, but has to be wrapped into list, same I think make sense for language objects.

# expression columns in rbindlist #546
a <- data.table(c1 = 1, c2 = 'asd', c3 = expression(as.character(Sys.time())))
b <- data.table(c1 = 3, c2 = 'qwe', c3 = expression(as.character(Sys.time()+5)))
test(2098, rbind(a,b)$c3, expression(as.character(Sys.time()), as.character(Sys.time()+5)))
Copy link
Member

@jangorecki jangorecki Sep 2, 2019

Choose a reason for hiding this comment

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

I don't find this useful at all. The new expression doesn't even evaluate. I am against combining language objects in rbindlist. The useful scenario I had in the past was to have them in a list column, which at that time I was not aware (5 years ago).

@codecov
Copy link

codecov bot commented Sep 2, 2019

Codecov Report

Merging #3811 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3811      +/-   ##
==========================================
+ Coverage   99.41%   99.41%   +<.01%     
==========================================
  Files          72       71       -1     
  Lines       13909    13266     -643     
==========================================
- Hits        13828    13189     -639     
+ Misses         81       77       -4
Impacted Files Coverage Δ
src/rbindlist.c 100% <100%> (ø) ⬆️
src/assign.c 100% <100%> (ø) ⬆️
src/fwrite.c 97.82% <0%> (-0.1%) ⬇️
src/fsort.c 95.8% <0%> (-0.03%) ⬇️
R/wrappers.R 100% <0%> (ø) ⬆️
src/fwriteR.c 100% <0%> (ø) ⬆️
src/froll.c 100% <0%> (ø) ⬆️
R/foverlaps.R 100% <0%> (ø) ⬆️
R/tables.R 100% <0%> (ø) ⬆️
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4d81f3...931587e. Read the comment docs.

@jangorecki
Copy link
Member

maybe just add unit tests modifying original example by wrapping expressions into lists? then PR will cover some existing use case.

@mattdowle mattdowle modified the milestones: 1.12.4, 1.13.0 Sep 11, 2019
@mattdowle
Copy link
Member

Marked as 1.13.0 as a way to exclude from 1.12.4, but still come back to it.

@mattdowle mattdowle modified the milestones: 1.12.7, 1.12.9 Dec 8, 2019
@mattdowle
Copy link
Member

mattdowle commented Dec 20, 2019

codecov results aren't updating. log states that upload succeeded but then there's a timeout after that line. a rerun didn't fix it. proceeding to merge and we should see master's coverage update.

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.

[R-Forge #5252] rbindlist should support expression columns
3 participants