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

Stop lying about WeakRefStringArray eltype #17

Merged
merged 1 commit into from
Dec 19, 2017

Conversation

nalimilan
Copy link
Member

getindex() always returns a String, never a WeakRefString.

See JuliaData/CSV.jl#118 (comment).

getindex() always returns a String, never a WeakRefString.
@codecov
Copy link

codecov bot commented Nov 28, 2017

Codecov Report

Merging #17 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #17   +/-   ##
=======================================
  Coverage   78.72%   78.72%           
=======================================
  Files           1        1           
  Lines          47       47           
=======================================
  Hits           37       37           
  Misses         10       10
Impacted Files Coverage Δ
src/WeakRefStrings.jl 78.72% <ø> (ø) ⬆️

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 bcd2f0f...8b02e7a. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Nov 28, 2017

Codecov Report

Merging #17 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #17   +/-   ##
=======================================
  Coverage   78.72%   78.72%           
=======================================
  Files           1        1           
  Lines          47       47           
=======================================
  Hits           37       37           
  Misses         10       10
Impacted Files Coverage Δ
src/WeakRefStrings.jl 78.72% <ø> (ø) ⬆️

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 bcd2f0f...8b02e7a. Read the comment docs.

@nalimilan
Copy link
Member Author

This is a quick fix. Longer-term, there should be another type parameter to say whether the array can contain missing values or not (as for CategoricalArray).

@nalimilan
Copy link
Member Author

Note that this actually fixes the corruption bug I noted at nalimilan/FreqTables.jl#16. It was due to the fact that the eltype was defined as WeakRefString. After changing the eltype to Union{String, Missing}, WeakRefString objects no longer escape the array and everything is OK.

@quinnj quinnj merged commit 69d5ff8 into JuliaData:master Dec 19, 2017
@nalimilan nalimilan deleted the nl/eltype branch December 19, 2017 14:16
alyst added a commit to alyst/WeakRefStrings.jl that referenced this pull request Dec 20, 2017
enhances JuliaData#17 so that WeakRefStringArray allows missing iff
the underlying WeakRefString Array allows missing
alyst added a commit to alyst/WeakRefStrings.jl that referenced this pull request Dec 20, 2017
enhances JuliaData#17 so that WeakRefStringArray allows missing iff
the underlying WeakRefString Array allows missing
alyst added a commit to alyst/WeakRefStrings.jl that referenced this pull request Dec 20, 2017
enhances JuliaData#17 so that WeakRefStringArray allows missing iff
the underlying WeakRefString Array allows missing
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.

2 participants