Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

json::coerce_data_type fails if there are no lines to be read from reader #911

Closed
Igosuki opened this issue Mar 13, 2022 · 0 comments · Fixed by #974
Closed

json::coerce_data_type fails if there are no lines to be read from reader #911

Igosuki opened this issue Mar 13, 2022 · 0 comments · Fixed by #974
Labels
bug Something isn't working good first issue Good for newcomers no-changelog Issues whose changes are covered by a PR and thus should not be shown in the changelog

Comments

@Igosuki
Copy link
Contributor

Igosuki commented Mar 13, 2022

In ndjson::read::file::infer, if the reader yields no rows then the method will panic because coerce_data_type expects at least one element in the array.

Solution : return an error, or Ok(DataType::Null) if there are no records

@jorgecarleitao jorgecarleitao added the bug Something isn't working label Mar 13, 2022
@jorgecarleitao jorgecarleitao added the good first issue Good for newcomers label Apr 22, 2022
@jorgecarleitao jorgecarleitao added the no-changelog Issues whose changes are covered by a PR and thus should not be shown in the changelog label May 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers no-changelog Issues whose changes are covered by a PR and thus should not be shown in the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants