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

Ability to create Schema with new fields but same everytthing else #6575

Open
alamb opened this issue Oct 16, 2024 · 1 comment · May be fixed by #6576
Open

Ability to create Schema with new fields but same everytthing else #6575

alamb opened this issue Oct 16, 2024 · 1 comment · May be fixed by #6576
Assignees
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog

Comments

@alamb
Copy link
Contributor

alamb commented Oct 16, 2024

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

It is common downstream to manipulate Schamas in someway, such as to reorder the fields or select a subset of the fields
Schema also contains metadata, and thus care must be taken when creating derivative schemas to call Schema::new_with_metadata
Forgetting to do this has lead to several issues downstream in DataFusion -- see list on apache/datafusion#12733

Describe the solution you'd like
I would like it to be easier to create a Schema with different fields and different properties

Describe alternatives you've considered

Additional context

@alamb alamb added the enhancement Any new improvement worthy of a entry in the changelog label Oct 16, 2024
@alamb alamb self-assigned this Oct 16, 2024
@alamb
Copy link
Contributor Author

alamb commented Oct 16, 2024

Actually, reading the code i see SchemaBuilder already mostly does this, though it looks like it is not super clear how to specify a field subset. I will play around with some examples

@alamb alamb added the arrow Changes to the arrow crate label Oct 16, 2024
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 enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant