Closed Alexander-Barth closed 5 years ago
I've got this problem with columns that are Union{String, Missing}
blah = table(["hi", missing, "oh", "what"], rand(4), names=[:x, :y])
distribute(blah, 1)
ERROR: ArgumentError: type does not have a definite number of fields
From the stacktrace, this appears to be an issue in MemPool (a dependency of Dagger). Does anyone have an MWE which uses the built-in Julia missing
type (i.e. without using Missings.jl)?
Actually with Dagger v0.8.0, the issue if fixed. I can run this snipped without error and I get the correct value. Thanks for checking back!
julia> using Dagger
julia> using Missings
julia> x = allowmissing(rand(1:10, 10, 5))
10×5 Array{Union{Missing, Int64},2}:
6 9 6 6 5
5 7 9 10 5
5 6 6 1 3
7 9 3 3 9
8 7 4 6 10
9 5 5 2 5
5 10 7 1 4
10 6 8 6 5
7 3 3 1 7
7 4 5 7 4
julia> @show reduce(+, x, dims=1) # works
reduce(+, x, dims=1) = Union{Missing, Int64}[69 66 56 43 57]
1×5 Array{Union{Missing, Int64},2}:
69 66 56 43 57
julia> X = Distribute(Blocks(3,3), x)
Distribute{Union{Missing, Int64},2}(10, 5)
julia> collect(reduce(+, X, dims=1))
1×5 Array{Int64,2}:
69 66 56 43 57
I try to use Dagger on an array of the type
Array{Union{Missing, Int64},2}
but I get an error (see below). I tried to adapt this example https://github.com/JuliaParallel/Dagger.jl/blob/master/test/array.jl#L155 to find out how Dagger is working. Is there a problem with my code or is this a bug? I use julia 1.0.1 and Dagger 0.7.1.The code
The full error message is: