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

Restrict wrapped types to reduce invalidations #310

Merged
merged 3 commits into from
Nov 7, 2020
Merged

Commits on Oct 31, 2020

  1. Restrict wrapped types to reduce invalidations

    Methods like `convert(::Type{Any}, ::CategoricalValue)` triggers lots of invalidations.
    Restricting the wrapped types to `AbstractString`, `AbstractChar` and `Number` alleviates
    this problem without affecting usability too much.
    
    One limit with this approach is that e.g. `convert(Union{String, T}, CategoricalValue{String})`
    won't work anymore for any `T`, even though `convert(String, CategoricalValue{String})` will.
    Though thanks to special casing, it will work for `T <: Missing` and `T <: Nothing`.
    
    This also means that `CategoricalArray{Any}` is no longer supported. Adapt promotion rules
    to ensure that mixing e.g. strings and integers gives `Union{String, Integer}`. Drop support
    for `nothing`.
    
    Also remove the custom `repr` method which was a legacy of the `CategoricalString` era.
    nalimilan committed Oct 31, 2020
    Configuration menu
    Copy the full SHA
    b418329 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2020

  1. Narrow unsupported eltypes

    nalimilan committed Nov 5, 2020
    Configuration menu
    Copy the full SHA
    0c8722d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    99ae870 View commit details
    Browse the repository at this point in the history