forked from ClickHouse/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 apache#9950 from thisisnic/ARROW-11468 Authored-by: Nic Crane <[email protected]> Signed-off-by: Neal Richardson <[email protected]>
- Loading branch information
1 parent
b5045ed
commit 894fab0
Showing
6 changed files
with
149 additions
and
14 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters