-
Notifications
You must be signed in to change notification settings - Fork 611
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
bug: ibis.memtable(<Structs>) doesn't preserve struct field order #8166
Comments
Thanks for the issue. I initially thought this was a repr issue, but when I create physical tables in a file their field order is preserved.
Then in IPython
The next place to look is in |
This appears to be the result of PyArrow's type inference, which is what we're using to infer the schema of data in memtables. It looks like PyArrow sorts the fields, I haven't looked into why. I'm not sure what we can do about this. Other than being perhaps a bit surprising, is this impeding your work in some way? |
It was perplexing me as I wrote tests that were weirdly failing, but it wasn't that hard to workaround once I figured out what it was. Not a high priority for me at the moment to fix this. |
I'd be fine with filing an issue with pyarrow and then closing this out, waiting for them to fix it upstream. Adding in compat code here in ibis seems like overkill |
Thanks, I think we're probably unlikely to address this on the Ibis side anytime soon. |
noting that this is caused by
|
What happened?
Both field orders are the same, I assume in alphabetical order. I would expect the field order to be preserved from the key order in the dict. Maybe this is an upstream issue with duckdb?
What version of ibis are you using?
main, 80e13b4
What backend(s) are you using, if any?
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: