You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wasn't sure whether to raise this issue in DataFrames or here, but it appears to be a Julia issue with results differing depending on precompilation that I'm seeing across a number of packages in one form or another.
This could be related to issues #20369 and JuliaStats/DataArrays.jl#232 which appeared to have been addressed by #18869, which I assumed was included in the 0.5.1 release (but may not have been?)
The issue arises when I create a precompiled user image which includes DataFrames, where some methods (specifically view) will fail that would work when not using a userimg. I'm using OS X and Julia 0.5.1, however this issue was able to be replicated on Linux and in 0.5.0.
Also, this package had been successfully incorporated into a userimg prior to JuliaData/DataFrames.jl@19821b9, the most significant change being moving from sub to Base.view for creating SubDataFrames.
The following simple example fails (which works fine when not using the userimg):
$ julia -J ~/sys.dylib
julia>using DataFrames
julia> x =DataFrame(x=[1])
julia>view(x, [true])
ERROR: MethodError: Cannot `convert` an object of type Array{Int64,1} to an object of type Int64
This may have arisen from a call to the constructor Int64(...),
since type constructors fall back to convert methods.
inview(::DataFrames.DataFrame, ::Array{Bool,1}) at /usr/local/share/julia/site/v0.5/DataFrames/src/subdataframe/subdataframe.jl:87
Apart from Julia producing different code paths depending upon whether the package has been precompiled into a userimg (which seems like a real bug), there appears to be an bug in DataFrames, specifically this function in subdataframe/subdataframe.jl:
functionSubDataFrame{S <: Integer}(parent::DataFrame, rows::AbstractVector{S})
returnview(parent, Int(rows))
end
which doesn't look correct, seems to serve no purpose (all tests still pass when it is removed) and doesn't get called unless it has been baked into a userimg.
Will make a PR at DataFrames.jl which will address my immediate issue, but I'm still curious about different behaviour when precompiling.
I wasn't sure whether to raise this issue in DataFrames or here, but it appears to be a Julia issue with results differing depending on precompilation that I'm seeing across a number of packages in one form or another.
This could be related to issues #20369 and JuliaStats/DataArrays.jl#232 which appeared to have been addressed by #18869, which I assumed was included in the 0.5.1 release (but may not have been?)
The issue arises when I create a precompiled user image which includes DataFrames, where some methods (specifically
view
) will fail that would work when not using a userimg. I'm using OS X and Julia 0.5.1, however this issue was able to be replicated on Linux and in 0.5.0.Also, this package had been successfully incorporated into a userimg prior to JuliaData/DataFrames.jl@19821b9, the most significant change being moving from
sub
toBase.view
for creatingSubDataFrame
s.Minimal example
The following simple example fails (which works fine when not using the userimg):
$ julia -J ~/sys.dylib
Expected:
The text was updated successfully, but these errors were encountered: