Skip to content

Commit 7d399b1

Browse files
author
Pietro Vertechi
authored
Merge pull request JuliaArrays#91 from piever/pv/test
Minor cleanup
2 parents 83388d8 + ce02863 commit 7d399b1

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Project.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ julia = "1"
1313

1414
[extras]
1515
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
16-
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
1716
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
18-
WeakRefStrings = "ea10d353-3f73-51f8-a26c-33c1cb351aa5"
1917

2018
[targets]
21-
test = ["Test", "OffsetArrays", "Tables", "WeakRefStrings"]
19+
test = ["Test", "OffsetArrays"]

src/StructArrays.jl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ include("collect.jl")
1414
include("sort.jl")
1515
include("groupjoin.jl")
1616
include("lazy.jl")
17-
using Tables, WeakRefStrings
1817
include("tables.jl")
19-
function refs(a::WeakRefStrings.StringArray{T}) where {T}
20-
S = Union{WeakRefStrings.WeakRefString{UInt8}, typeintersect(T, Missing)}
21-
convert(WeakRefStrings.StringArray{S}, a)
22-
end
2318

2419
end # module

src/sort.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
using Base.Sort, Base.Order
2+
using WeakRefStrings: WeakRefString, StringArray
23

34
refs(v::PooledArray) = v.refs
5+
function refs(a::StringArray{T}) where {T}
6+
S = Union{WeakRefString{UInt8}, typeintersect(T, Missing)}
7+
convert(StringArray{S}, a)
8+
end
49
refs(v::AbstractArray) = v
510
refs(v::StructArray) = StructArray(map(refs, fieldarrays(v)))
611

src/tables.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using Tables: Tables
2+
13
Tables.istable(::Type{<:StructVector}) = true
24
Tables.rowaccess(::Type{<:StructVector}) = true
35
Tables.columnaccess(::Type{<:StructVector}) = true

0 commit comments

Comments
 (0)