-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
We have observed that casting a struct with fields of the same type, to a schema that re-orders the fields, miss-assigns the values. It appears like the values are assigned positionally, instead of by field name.
To Reproduce
I've prepared a reproducing example here: https://github.com/aroig/datafusion-cast-bug
Just do cargo run
to reproduce.
Expected behavior
I would expect that casting {"b": 3, "a": 4}
, to schema {"a": Int, "b": Int}
would produce {"a": 4, "b": 3}
, however the obtained result is {"a": 3, "b": 4}
, as if the values are assigned positionally instead of by field name.
Additional context
No response
alambrtyler
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working