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

Warn if user passes threaded=true, but there aren't enough rows #731

Merged
merged 1 commit into from
Aug 18, 2020

Conversation

quinnj
Copy link
Member

@quinnj quinnj commented Aug 18, 2020

Fixes #723. The issue is that for threaded parsing, we need a minimum of
5 rows per task to correctly check that each threaded chunk starts at a
proper row start position; if we don't have at least 5 rows per task,
then we'll now issue a warning and set threaded = false.

Fixes #723. The issue is that for threaded parsing, we need a minimum of
5 rows per task to correctly check that each threaded chunk starts at a
proper row start position; if we don't have at least 5 rows per task,
then we'll now issue a warning and set `threaded = false`.
@@ -526,6 +526,11 @@ f = CSV.File(transcode(GzipDecompressor, Mmap.mmap(joinpath(dir, "randoms.csv.gz
@test length(f) == 70000
@test eltype(f.first) == String

# 723
f = CSV.File(IOBuffer("col1,col2,col3\n1.0,2.0,3.0\n1.0,2.0,3.0\n1.0,2.0,3.0\n1.0,2.0,3.0\n"); threaded=true)
Copy link
Member

Choose a reason for hiding this comment

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

do you have CI set up to use multiple threads?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes; we start julia with 1 and 2 threads.

@codecov
Copy link

codecov bot commented Aug 18, 2020

Codecov Report

Merging #731 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #731      +/-   ##
==========================================
+ Coverage   84.75%   84.78%   +0.02%     
==========================================
  Files          10       10              
  Lines        1850     1853       +3     
==========================================
+ Hits         1568     1571       +3     
  Misses        282      282              
Impacted Files Coverage Δ
src/file.jl 94.73% <100.00%> (+0.02%) ⬆️

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 2e57b3a...16cbf23. Read the comment docs.

@quinnj quinnj merged commit 52adf19 into master Aug 18, 2020
@quinnj quinnj deleted the jq/723 branch August 18, 2020 12:56
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.

Problem with threading on short files
2 participants