@@ -59,8 +59,8 @@ allocate(::Type{T}, rows, ref) where {T} = Vector{T}(undef, rows)
59
59
# allocate(::Type{T}, rows, ref) where {T <: Union{CategoricalValue, Missing}} =
60
60
# CategoricalArray{CategoricalArrays.unwrap_catvalue_type(T)}(rows)
61
61
# special case for WeakRefStrings
62
- allocate (:: Type{WeakRefString{T}} , rows, ref) where {T} = WeakRefStringArray (ref, WeakRefString{T} , rows)
63
- allocate (:: Type{Union{WeakRefString{T}, Missing}} , rows, ref) where {T} = WeakRefStringArray (ref, Union{WeakRefString{T}, Missing} , rows)
62
+ allocate (:: Type{WeakRefString{T}} , rows, ref) where {T} = StringVector {String} (ref , rows)
63
+ allocate (:: Type{Union{WeakRefString{T}, Missing}} , rows, ref) where {T} = StringVector {String} (ref , rows)
64
64
allocate (:: Type{Missing} , rows, ref) = fill (missing , rows)
65
65
66
66
# NamedTuple doesn't allow duplicate names, so make sure there are no duplicates in our column names
@@ -124,9 +124,9 @@ function NamedTuple(sch::Data.Schema{R}, ::Type{S}=Data.Field,
124
124
foreach (col-> resize! (col, newsize), sink)
125
125
sch. rows = newsize
126
126
end
127
- # take care of a possible reference from source by letting WeakRefStringArrays hold on to them
127
+ # take care of a possible reference from source by letting StringVector hold on to them
128
128
if ! isempty (reference)
129
- foreach (col-> col isa WeakRefStringArray && push ! (col. data , reference), sink)
129
+ foreach (col-> col isa StringVector && append ! (col. buffer , reference), sink)
130
130
end
131
131
else
132
132
# allocating a fresh NamedTuple Sink; append is irrelevant
0 commit comments