-
Notifications
You must be signed in to change notification settings - Fork 35
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
Fix ambiguity error on construction from ChainedVector
#369
Conversation
src/CategoricalArrays.jl
Outdated
DataAPI.defaultarray(::Type{CategoricalValue{T, R}}, N) where {T, R} = | ||
CategoricalArray{T, N, R} | ||
DataAPI.defaultarray(::Type{Union{CategoricalValue{T, R}, Missing}}, N) where {T, R} = | ||
CategoricalArray{Union{T, Missing}, N, R} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are these definitions linked to JSON? I would assume they make sense in general.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops. Unfortunately tests don't catch this as JSON is loaded earlier...
CategoricalArray{Union{T, Missing}, N, R} | ||
end | ||
|
||
@require RecipesBase="3cdcf5f2-1ef4-517c-9805-6587b60abb01" @eval begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be good to cover this with tests if it is not overly complex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's tested AFAICT. Or do you mean something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just coveage test was signaling it is not tested. That is why I asked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean line 50 at https://github.com/JuliaData/CategoricalArrays.jl/runs/3633298660? That's probably a bug, as other lines in the block appear to be covered. I guess a macro within two macro calls is too complex for coverage checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
src/CategoricalArrays.jl
Outdated
copyto!(dest::CatArrOrSub{<:Any, 1}, dstart::Union{Signed, Unsigned}, | ||
src::SentinelArrays.ChainedVector, sstart::Union{Signed, Unsigned}, | ||
n::Union{Signed, Unsigned}) = | ||
invoke(copyto!, Tuple{AbstractArray, Union{Signed, Unsigned}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
I understand that the proper code blocks will be executed both when:
Right? |
Yes, at least that's my understanding. :-) |
a4741d0
to
7904fc9
Compare
Fix #361 adding special methods for
ChainedVector
, and make as many dependencies as possible optional using Requires.jl.@time using CategoricalArrays
on a fresh session goes down from 0.26s to 0.18s.