Conversation
|
Thanks for showing what the fix would look like. For now, I'm closing in favor of #235, but we might revisit if there are complaints on the "empty struct" error. |
|
As predicted here this breaks compatibility with IndexedTables. Ongoing JuliaData/IndexedTables.jl#308 |
|
Note that this PR wasn't merged into StructArrays. What exactly breaks in IndexedTables? I don't see any details in the linked issue. julia> StructArray([1,2])
0-element StructArray() with eltype Int64 with indices 1:0 |
Nothing breaks right now, because compat of StructArrays is still on 0.4. Here I've done some work to bring compat to 0.5. IndexedTables is still compatible with 0.6 only up to v0.6.12. However, it's not compatible with v0.6.13 and onwards. What breaks is some constructor, as mentioned here. If you're interested I can find you the stacktrace. If you want to reproduce yourself, you can go on my 0.5 branch, and bump compat to 0.6. |
|
Ok I've retrieved the stacktrace for you and placed it here |
Alternative to #235: actually support StructArrays with eltypes that have no fields.
I regularly get bitten by stuff like
StructArray([1, 2, 3])returning empty arrays, and ask to consider merging one of these PRs. #235 makes it throw an error instead of a silently wrong behavior, and this PR makes no-field eltypes actually work.