commit | 894fab074ca7cf10af251d4b4217d428596626a2 | [log] [tgz] |
---|---|---|
author | Nic Crane <thisisnic@gmail.com> | Wed Apr 14 16:32:44 2021 -0700 |
committer | Neal Richardson <neal.p.richardson@gmail.com> | Wed Apr 14 16:32:44 2021 -0700 |
tree | dd22c9447607dc302c097fde0e16e7f69e0f0144 | |
parent | b5045ed833aaff35e6c8064ac7d908c19a5f48fa [diff] |
ARROW-11468: [R] Allow user to pass schema to read_json_arrow() A couple of things I wanted to check are expected behaviour: 1. If I specify in the schema that a numeric column should be a string column, I get the error `Error: Invalid: JSON parse error: Column(/third_col) changed from string to number in row 0` (e.g. if I run the following) ``` tf <- tempfile() writeLines(' { "hello": 3.5, "world": 2, "third_col": 99} { "hello": 3.25, "world": 5, "third_col": 98} { "hello": 3.125, "world": 8, "third_col": 97 } { "hello": 0.0, "world": 10, "third_col": 96} ', tf) read_json_arrow(tf, schema = schema(third_col = utf8(), world = float64())) ``` 2. As can be seen in the tests output (will delete the `print` statements before this is merged), table columns are returned in the order specified in the schema and then the columns not mentioned in the schema. Closes #9950 from thisisnic/ARROW-11468 Authored-by: Nic Crane <thisisnic@gmail.com> Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
Apache Arrow is a development platform for in-memory analytics. It contains a set of technologies that enable big data systems to process and move data fast.
Major components of the project include:
Arrow is an Apache Software Foundation project. Learn more at arrow.apache.org.
The reference Arrow libraries contain many distinct software components:
The official Arrow libraries in this repository are in different stages of implementing the Arrow format and related features. See our current feature matrix on git master.
Please read our latest project contribution guide.
Even if you do not plan to contribute to Apache Arrow itself or Arrow integrations in other projects, we'd be happy to have you involved: