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

Regression: the trait bound for<'de> arrow::datatypes::Schema: serde::de::Deserialize<'de> is not satisfied #2825

Closed
domoritz opened this issue Oct 4, 2022 · 4 comments
Labels
arrow Changes to the arrow crate bug

Comments

@domoritz
Copy link
Member

domoritz commented Oct 4, 2022

Describe the bug
Arrow 24 does not support de-serializing schemas with the flow code anymore.

To Reproduce

let schema: Result<arrow::datatypes::Schema, serde_json::Error> =
                serde_json::from_reader(schema_file)

The same code used to work with previous arrow versions. See https://github.com/domoritz/csv2parquet

@domoritz domoritz added the bug label Oct 4, 2022
@domoritz domoritz changed the title Regression: the trait bound for<'de> arrow::datatypes::Schema: serde::de::Deserialize<'de> is not satisfied Regression: the trait bound \for<'de> arrow::datatypes::Schema: serde::de::Deserialize<'de>\ is not satisfied Oct 4, 2022
@domoritz domoritz changed the title Regression: the trait bound \for<'de> arrow::datatypes::Schema: serde::de::Deserialize<'de>\ is not satisfied Regression: the trait bound for<'de> arrow::datatypes::Schema: serde::de::Deserialize<'de> is not satisfied Oct 4, 2022
@tustvold
Copy link
Contributor

tustvold commented Oct 4, 2022

Have you enabled the serde feature on arrow_schema?

@domoritz
Copy link
Member Author

domoritz commented Oct 4, 2022

No. Do I need to make arrow schema an explicit dependency?

@tustvold
Copy link
Contributor

tustvold commented Oct 4, 2022

I think you may need to, yes. I didn't plumb a feature flag through when I split the crates apart. This wasn't intentional, but I think I would rather leave it as is, less default features the better even if it was accidental 😅

@domoritz
Copy link
Member Author

domoritz commented Oct 4, 2022

Thank you. Adding arrow-schema = { version = "24.0.0", features = ["serde"] } fixed it.

Having to update multiple crates concurrently is a bit tricky since dependabot cannot do it right now. It would be awesome if you could make it so that the parquet crate automatically imported arrow and arrow schema at some point.

I'll close this issue since my issue is solved. Thank you @tustvold!

@domoritz domoritz closed this as completed Oct 4, 2022
@alamb alamb added the arrow Changes to the arrow crate label Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate bug
Projects
None yet
Development

No branches or pull requests

3 participants