Skip to content

[R] Binding for n_distinct() with no grouping #29634

@asfimport

Description

@asfimport

ARROW-13620 added a binding for n_distinct() but it only works for grouped aggregation, not whole-table aggregation. 

This works:

Table$create(starwars) %>%
  group_by(homeworld) %>%
  summarise(n_distinct(species)) %>%
  collect()

but this errors:

Table$create(starwars) %>%
  summarise(n_distinct(species)) %>%
  collect()

#> Error: Key error: No function registered with name: count_distinct

Once we have a non-hash count_distinct aggregate kernel in the C++ library (ARROW-14035) we should bind the options for it in the R package and add a test.

Reporter: Ian Cook / @ianmcook
Assignee: Percy Camilo Triveño Aucahuasi / @aucahuasi

Related issues:

Note: This issue was originally created as ARROW-14036. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions