Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
7.0.0
-
None
-
None
Description
If you have a JSON object field that is always empty, it seems to be not handled well, whether or not a schema is provided that tells Arrow what should be in that object.
library(arrow) #> #> Attaching package: 'arrow' #> The following object is masked from 'package:utils': #> #> timestamp json_val <- '{ "rows": [ {"empty": {} }, {"empty": {} }, {"empty": {} } ] }' # Remove newlines json_val <- gsub("\n", "", json_val) json_file <- tempfile() writeLines(json_val, json_file) schema <- schema(field("rows", list_of(struct(empty = struct(y = int32()))))) raw <- read_json_arrow(json_file, schema=schema) raw$rows$empty #> Error: Corrupt x: no names