Skip to content

Tweak allocation of initial buffers when nrows argument is provided - #2244

Merged
mattdowle merged 5 commits into
Rdatatable:masterfrom
st-pasha:fread_maxnrows
Jul 8, 2017
Merged

mattdowle merged 5 commits into
Rdatatable:masterfrom
st-pasha:fread_maxnrows

Conversation

@st-pasha

@st-pasha st-pasha commented Jul 4, 2017

Copy link
Copy Markdown
Contributor

When nrows argument is provided, reduce the number of jump points accordingly, and make sure that initialBuffRows cannot become 0.
Closes #2243

…ordingly, and make sure that initialBuffRows cannot become 0. Closes #2243
@st-pasha st-pasha added the fread label Jul 4, 2017
@st-pasha
st-pasha requested a review from mattdowle July 4, 2017 06:35
@codecov-io

codecov-io commented Jul 4, 2017 •

Copy link
Copy Markdown

Codecov Report

Merging #2244 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2244      +/-   ##
==========================================
+ Coverage   90.73%   90.74%   +0.01%     
==========================================
  Files          59       59              
  Lines       11511    11513       +2     
==========================================
+ Hits        10445    10448       +3     
+ Misses       1066     1065       -1
Impacted Files Coverage Δ
src/fread.c 93.67% <100%> (+0.32%) ⬆️
src/forder.c 93.68% <0%> (-0.27%) ⬇️

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 bef5403...6507f07. Read the comment docs.

st-pasha and others added 3 commits July 5, 2017 14:26
Do not reduce the number of rows sampled, otherwise we may not detect the types correctly.
@mattdowle mattdowle added this to the v1.10.6 milestone Jul 8, 2017

@mattdowle mattdowle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes requested were made, thanks. That fread should still sample whole file as normal even if only a few rows are requested by nrows. For type consistency if the user is grabbing the file in sections using skip and nrows.

@mattdowle
mattdowle merged commit ea85c4e into Rdatatable:master Jul 8, 2017
@st-pasha
st-pasha deleted the fread_maxnrows branch July 8, 2017 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants