Skip to content
Permalink
Browse files
Fix copy on DictEncode (#111)
Fixes #102. The issue comes up because DataFrames constructor tries to
make a copy of input columns by default when constructing; for
DictEncode, it's just a wrapper to signal that a column should be
copied, so we just make a shallow copy.
  • Loading branch information
quinnj committed Jan 25, 2021
1 parent e7cd867 commit fd7661383f22f8c9157871b09b090ad3aa9ea94d
Showing 1 changed file with 1 addition and 0 deletions.
@@ -59,6 +59,7 @@ Base.size(x::DictEncode) = (length(x.data),)
Base.iterate(x::DictEncode, st...) = iterate(x.data, st...)
Base.getindex(x::DictEncode, i::Int) = getindex(x.data, i)
ArrowTypes.ArrowType(::Type{<:DictEncodeType}) = DictEncodedType()
Base.copy(x::DictEncode) = DictEncode(x.data, x.id)

"""
Arrow.DictEncoded

0 comments on commit fd76613

Please sign in to comment.