You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Neal Richardson (Jira)" <ji...@apache.org> on 2021/09/07 14:01:00 UTC

[jira] [Created] (ARROW-13926) [R] Support mutate/summarize with implicit join

Neal Richardson created ARROW-13926:
---------------------------------------

             Summary: [R] Support mutate/summarize with implicit join
                 Key: ARROW-13926
                 URL: https://issues.apache.org/jira/browse/ARROW-13926
             Project: Apache Arrow
          Issue Type: New Feature
          Components: R
            Reporter: Neal Richardson
             Fix For: 6.0.0


{code}
mtcars %>%
  group_by(cyl) %>%
  mutate(x = hp - mean(hp)
{code}

essentially means something like

{code}
mtcars %>%
  left_join(mtcars %>%
    group_by(cyl) %>%
    summarize(tmp = mean(hp))
  ) %>%
  mutate(x = hp - tmp) %>%
  select(-tmp)
{code}

Apparently you can do the same inside summarize() too (though IDK if that's behavior we want to encourage). Once we can do joins, we can support these queries.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)