Skip to content

Commit 43afa64

Browse files
committed
bug fix
1 parent 279f723 commit 43afa64

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/other/utils.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ end
1818
Missings.allowmissing(a::PooledArray) = convert(PooledArray{Union{Missing, eltype(a)}}, a)
1919

2020
function allocatecol(x::AbstractVector, len; addmissing = true)
21-
@assert len > 0 "cannot allocate a column with length zero"
21+
if addmissing
22+
@assert len > 0 "cannot allocate a column with length zero"
23+
end
2224
if DataAPI.refpool(x) !== nothing
2325
if x isa PooledArray
2426
_res = PooledArray(PooledArrays.RefArray(x.refs[1:1]), DataAPI.invrefpool(x), DataAPI.refpool(x), PooledArrays.refcount(x))

test/join.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,9 @@ end
401401

402402
@test o(on) == Dataset(id = [1, 3, 5, 0, 2, 4], fid = [1, 3, 5, 0, 2, 4])
403403
@test typeof.(eachcol(o(on))) == [Vector{Union{Missing, Int}}, Vector{Union{Missing, Float64}}]
404+
dsl = Dataset(x=[1,2], y=[3,4])
405+
re = innerjoin(dsl, dsl, on = [:x=>:y], makeunique = true)
406+
@test Dataset([[],[],[]], names(re)) == re
404407
end
405408
#
406409
# @testset "all joins with CategoricalArrays" begin

0 commit comments

Comments
 (0)