You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "umweltinfo (via GitHub)" <gi...@apache.org> on 2026/07/15 12:26:16 UTC
[I] [R] read_ipc_stream fails to unify nested Enum fields inside a Struct array across record batches [arrow]
umweltinfo opened a new issue, #50514:
URL: https://github.com/apache/arrow/issues/50514
### Describe the bug, including details regarding any error messages, version, and platform.
When reading an Arrow IPC stream that contains a nested Struct array named resources, the field "type"is an Enum in the source API schema (described here: https://md.umwelt.info/swagger-ui/ at the bottom in Dataset/resources/type).
The R arrow package tries to cast this as a factor, but this produces an invalid dataframe.
If the column is transferred to character it works fine.
Minimal Reproducible Example
```
library(arrow)
library(httr2)
library(tidyr)
req <- httr2::request("https://md.umwelt.info/search/all?format=arrow_ipc") |>
httr2::req_url_query(
query = "type:'/Daten und Messstellen/Wasser/Flüsse' AND measuring_station:true",
language = "de"
)
resp <- httr2::req_perform(req)
raw_bytes <- httr2::resp_body_raw(resp)
df <- as.data.frame(arrow::read_ipc_stream(raw_bytes)) |>
unnest("resources", names_sep = "_")
glimpse(df) # yields: Error in as.character.factor(x) : malformed factor
glimpse(df[,21]) # resources_types is the field that causes the error
```
Environment
OS: Ubuntu 26.04 LTS
R Version: 4.5.2
arrow R Package Version: 25.0.0.9000
### Component(s)
R
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [R] read_ipc_stream fails to unify nested Enum fields inside a Struct array across record batches [arrow]
Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic closed issue #50514: [R] read_ipc_stream fails to unify nested Enum fields inside a Struct array across record batches
URL: https://github.com/apache/arrow/issues/50514
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [R] read_ipc_stream fails to unify nested Enum fields inside a Struct array across record batches [arrow]
Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic commented on issue #50514:
URL: https://github.com/apache/arrow/issues/50514#issuecomment-4982364571
Oof, we need to sort out our nested columns as this sounds a lot like #50339! Cheers for reporting this @umweltinfo!
Gonna run a Claude analysis and post the output here for a future bugfix
-------------------------------------------------------------------------------------
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [R] read_ipc_stream fails to unify nested Enum fields inside a Struct array across record batches [arrow]
Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic commented on issue #50514:
URL: https://github.com/apache/arrow/issues/50514#issuecomment-5704868676
Issue resolved by pull request 51153
https://github.com/apache/arrow/pull/51153
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org