-
Notifications
You must be signed in to change notification settings - Fork 3
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
Nested schema deserialization depends on column order #94
Comments
This is a (pretty bad 😨) bug |
EDIT: in an older version of this comment, i forgot we're packing these records into arrow structs (basically tuples, where the key info is stored in the table's schema), not maps (basically dicts where key info is stored inline). updated to reflect the former The root of the problem here is that
So even though the Arrow-formatted table does encode the necessary field information to enable deserialization that is agnostic to the field ordering employed at serialization time, the interface that Arrow.jl provides to downstream type authors prevents that information from being utilized. It'd be nice if the relevant the actual layout info I'd want to pass through from
so one non-breaking approach to add a struct StructElement{T<:NamedTuple}
fields::T
end
fromarrow(T::Type, x::StructElement) = fromarrow(T, values(x.fields)...) Then, update the relevant |
…#493) Motivated by beacon-biosignals/Legolas.jl#94 (comment) Still requires: - [x] docs - [x] a test - [x] a bit more due diligence benchmarking-wise. `@benchmark`ing the access in the test case from beacon-biosignals/Legolas.jl#94 didn't reveal any perf difference, which seems like a good sign --------- Co-authored-by: Eric Hanson <[email protected]>
will be resolved by #106 once it is merged/released (and once apache/arrow-julia#493 is released) |
resolved by #106 |
gives
which is incorrect, as
b
has value 1. This is becauseLegolas.jl/src/schemas.jl
Line 649 in b86444c
I am not sure if this is a bug or just a foot-gun (depending on what guarantees Legolas is supposed to have about column order not mattering).
The text was updated successfully, but these errors were encountered: