Skip to content
This repository was archived by the owner on Jul 17, 2019. It is now read-only.

Commit ee86456

Browse files
committed
Switch over to Project.toml
1 parent 7e15c9a commit ee86456

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

Project.toml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
name = "DataStreams"
22
uuid = "9a8bc11e-79be-5b39-94d7-1ccc349a1a85"
3-
version = "0.3.8"
43

54
[deps]
6-
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
75
Missings = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
8-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
96
WeakRefStrings = "ea10d353-3f73-51f8-a26c-33c1cb351aa5"
107

118
[compat]
12-
WeakRefStrings = "≥ 0.5.0"
13-
julia = "≥ 0.7.0"
9+
WeakRefStrings = "≥ 0.4.0"
10+
julia = "1"
11+
12+
[extras]
13+
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
14+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
15+
16+
[targets]
17+
test = ["Dates", "Test"]

REQUIRE

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/namedtuples.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ allocate(::Type{T}, rows, ref) where {T} = Vector{T}(undef, rows)
5959
# allocate(::Type{T}, rows, ref) where {T <: Union{CategoricalValue, Missing}} =
6060
# CategoricalArray{CategoricalArrays.unwrap_catvalue_type(T)}(rows)
6161
# 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)
6464
allocate(::Type{Missing}, rows, ref) = fill(missing, rows)
6565

6666
# 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,
124124
foreach(col->resize!(col, newsize), sink)
125125
sch.rows = newsize
126126
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
128128
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)
130130
end
131131
else
132132
# allocating a fresh NamedTuple Sink; append is irrelevant

0 commit comments

Comments
 (0)