Skip to content

[R] to_arrow() loses group_by() #40640

@xtimbeau

Description

@xtimbeau

Describe the bug, including details regarding any error messages, version, and platform.

When passing a duckdb dataset to arrow with to_arrow() grouping information is lost.

cars |> arrow::to_duckdb() |> dplyr::group_by(speed) |> arrow::to_arrow()
# output is ungrouped
#RecordBatchReader (query)
#speed: double
#dist: double

cars |> arrow::to_duckdb() |> arrow::to_arrow() |> dplyr::group_by(speed) 
# output is grouped
#RecordBatchReader (query)
#speed: double
#dist: double
#
#* Grouped by speed
#See $.data for the source Arrow object

Component(s)

R

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions