Skip to content

Commit

Permalink
Fix #548 by adding explicit copy method for columns of all missing va…
Browse files Browse the repository at this point in the history
…lues
  • Loading branch information
quinnj committed Dec 16, 2019
1 parent 5582e06 commit 1e10c9c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ Base.@propagate_inbounds function Base.getindex(c::Column2, i::Integer)
throw(BoundsError(c, i))
end

Base.copy(c::Union{Column{Missing, Missing}, Column2{Missing, Missing}}) = missings(length(c))

function Base.copy(c::Union{Column{T}, Column2{T}}) where {T}
len = length(c)
A = (T == String || T == Union{String, Missing}) ? StringVector{T}(undef, len) : Vector{T}(undef, len)
Expand Down

0 comments on commit 1e10c9c

Please sign in to comment.