You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Alexander Ocsa (Jira)" <ji...@apache.org> on 2021/09/30 18:39:00 UTC
[jira] [Updated] (ARROW-12763) [R] Optimize dplyr queries that use
head/tail after arrange
[ https://issues.apache.org/jira/browse/ARROW-12763?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Ocsa updated ARROW-12763:
-----------------------------------
Description:
Use the Arrow C++ function {{partition_nth_indices}} to optimize dplyr queries like this:
{code:r}
iris %>%
Table$create() %>%
arrange(desc(Sepal.Length)) %>%
head(10) %>%
collect()
{code}
This query sorts the full table even though it doesn't need to. It could use {{partition_nth_indices}} to find the rows containing the top 10 values of {{Sepal.Length}} and only collect and sort those 10 rows.
Test to see if this improves performance in practice on larger data.
was:
Use the Arrow C++ function {{partition_nth_indices}} to optimize dplyr queries like this:
{code:r}
iris %>%
Table$create() %>%
arrange(desc(Sepal.Length)) %>%
head(10) %>%
collect()
{code}
This query sorts the full table even though it doesn't need to. It could use {{partition_nth_indices}} to find the rows containing the top 10 values of {{Sepal.Length}} and only collect and sort those 10 rows.
Test to see if this improves performance in practice on larger data.
> [R] Optimize dplyr queries that use head/tail after arrange
> -----------------------------------------------------------
>
> Key: ARROW-12763
> URL: https://issues.apache.org/jira/browse/ARROW-12763
> Project: Apache Arrow
> Issue Type: Improvement
> Components: R
> Reporter: Ian Cook
> Assignee: Alexander Ocsa
> Priority: Major
>
> Use the Arrow C++ function {{partition_nth_indices}} to optimize dplyr queries like this:
> {code:r}
> iris %>%
> Table$create() %>%
> arrange(desc(Sepal.Length)) %>%
> head(10) %>%
> collect()
> {code}
> This query sorts the full table even though it doesn't need to. It could use {{partition_nth_indices}} to find the rows containing the top 10 values of {{Sepal.Length}} and only collect and sort those 10 rows.
> Test to see if this improves performance in practice on larger data.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)