apache / apache/arrow-rs

Support schema inference for top-level arrays

Open
#9,482 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
3.6k
Forks
1.3k
Avg merge
2d 18h
Merged PRs (30d)
169

Description

**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
The JSON reader already supports reading JSON files with top-level arrays via the `ReaderBuilder::new_with_field` method that was introduced by https://github.com/apache/arrow-rs/issues/4905.

However, there doesn't seem to be corresponding functionality in the schema inference logic, which still assumes that the top-level JSON values are objects whose fields map to the fields in the schema being inferred.

**Describe the solution you'd like**
Either create new complementary schema inference functions, or add an option to the existing functions, that allow the user to infer the schema of a JSON file which is intended for use with `ReaderBuilder::new_with_field`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.