Skip to content

Commit ce02863

Browse files
author
Pietro Vertechi
committed
move code around
1 parent 33ee238 commit ce02863

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

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)