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

Support reading from CSV, Avro and Json files that have mergeable/compatible, but not identical schemas #1669

Closed
alamb opened this issue Jan 24, 2022 · 2 comments · Fixed by #1709
Labels
datafusion Changes in the datafusion crate enhancement New feature or request

Comments

@alamb
Copy link
Contributor

alamb commented Jan 24, 2022

@thinkharderdev implemented schema merging functionality for Parquet files in #1622. However, this logic only applies to Parquet, and @tustvold noted that it would likely also be useful to apply to CSV, Avro and Json files so that DataFusion could read from files in those formats that had compatible but not identical schemas

Specifically, the logic in read_partition might be extracted into some of SchemaAdapter, akin to PartitionColumnProjector. This would allow the logic to be reused with other file formats, e.g. JSON or CSV, whilst also allowing testing it in isolation.

Originally posted by @tustvold in #1622 (comment)

@thinkharderdev
Copy link
Contributor

Since I made this mess I feel duty-bound to clean it up :) I can take this one.

@alamb
Copy link
Contributor Author

alamb commented Jan 27, 2022

Since I made this mess I feel duty-bound to clean it up :) I can take this one.

I wouldn't describe this as a mess ! The ability to merge multiple parquet files without the exact same schema is a great addition -- this will just be the icing on the cake, as it were

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants