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

Always update metadata in arrow schema #2274

Merged
merged 8 commits into from
Apr 29, 2021

Conversation

lhoestq
Copy link
Member

@lhoestq lhoestq commented Apr 27, 2021

We store a redundant copy of the features in the metadata of the schema of the arrow table. This is used to recover the features when doing Dataset.from_file. These metadata are updated after each transfor, that changes the feature types.

For each function that transforms the feature types of the dataset, I added a step in the tests to make sure the metadata in the arrow schema are up to date.

I also added a line to update the metadata directly in the Dataset.init method.
This way even a dataset instantiated with init will have a table with the right metadata.

Fix #2271.

cc @mariosasko

@lhoestq lhoestq merged commit 9a3fc19 into master Apr 29, 2021
@lhoestq lhoestq deleted the always-update-metadata-in-arrow-schema branch April 29, 2021 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Synchronize table metadata with features
1 participant