Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getindex broken with SVector{3, UInt} in the presence of missing data #486

Closed
adienes opened this issue Sep 13, 2023 · 2 comments · Fixed by JuliaArrays/StaticArrays.jl#1196

Comments

@adienes
Copy link

adienes commented Sep 13, 2023

MWE:

julia> df = DataFrame(:a => [1, 2, 3, missing]);

julia> Arrow.write("mwe.arrow", df);

julia> at = Arrow.Table("mwe.arrow");

julia> idxs = @SVector UInt[1,2,3];

julia> at.a[idxs]
ERROR: setindex!() with non-isbitstype eltype is not supported by StaticArrays. Consider using SizedArray.

versioninfo:

julia> versioninfo()
Julia Version 1.9.3
Commit bed2cd540a1 (2023-08-24 14:43 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 10 × Apple M1 Max
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 1 on 8 virtual cores

(@v1.9) pkg> st Arrow
Status `~/.julia/environments/v1.9/Project.toml`
  [69666777] Arrow v2.6.2
@adienes
Copy link
Author

adienes commented Sep 14, 2023

update: I believe this is (mostly) caused by StaticArrays.jl having a bug in its implementation of similar, which did not return a mutable container when eltype is not isbitstype, which is true of Union{Int, Missing}

however, I am still confused about why the above MWE works when idxs = @SVector [1,2,3] (aka, without the UInt)

@adienes
Copy link
Author

adienes commented Sep 23, 2023

@adienes adienes closed this as completed Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant