[ https://issues.apache.org/jira/browse/ARROW-14036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17417676#comment-17417676 ]
Ian Cook commented on ARROW-14036: ---------------------------------- [~npr] yes > [R] Binding for n_distinct() with no grouping > --------------------------------------------- > > Key: ARROW-14036 > URL: https://issues.apache.org/jira/browse/ARROW-14036 > Project: Apache Arrow > Issue Type: New Feature > Components: R > Reporter: Ian Cook > Priority: Critical > Labels: kernel > Fix For: 6.0.0 > > > ARROW-13620 added a binding for {{n_distinct()}} but it only works for > _grouped_ aggregation, not whole-table aggregation. > This works: > {code:java} > Table$create(starwars) %>% > group_by(homeworld) %>% > summarise(n_distinct(species)) %>% > collect(){code} > but this errors: > {code:java} > Table$create(starwars) %>% > summarise(n_distinct(species)) %>% > collect() > #> Error: Key error: No function registered with name: count_distinct{code} > 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. -- This message was sent by Atlassian Jira (v8.3.4#803005)