[ 
https://issues.apache.org/jira/browse/ARROW-10374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Lamb updated ARROW-10374:
--------------------------------
    Labels: beginner-friendly  (was: )

> [Rust] [DataFusion] Grouping by column position
> -----------------------------------------------
>
>                 Key: ARROW-10374
>                 URL: https://issues.apache.org/jira/browse/ARROW-10374
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Rust - DataFusion
>            Reporter: Pavel Tiunov
>            Priority: Major
>              Labels: beginner-friendly
>
> It would be great to have the support of grouping by column position instead 
> of grouping by exact expression. For example:
> {code:java}
> SELECT state, COUNT(*) FROM customers GROUP BY 1{code}
> For example, for a query like
> {code}
> > select database_name, storage, sum(estimated_bytes) from chunks group by 
> > database_name, storage;
> +-----------------------------------+---------------------+----------------------+
> | database_name                     | storage             | 
> SUM(estimated_bytes) |
> +-----------------------------------+---------------------+----------------------+
> | 844910ece80be8bc_cac95fa59126cd01 | OpenMutableBuffer   | 109737            
>    |
> | 844910ece80be8bc_05d1e95653672000 | OpenMutableBuffer   | 2337719           
>    |
> | 844910ece80be8bc_7be09b71c487d5d3 | ClosedMutableBuffer | 799682176         
>    |
> +-----------------------------------+---------------------+----------------------+
> {code}
> It can be expressed in the same way using numbers to refer to other items in 
> the select list.
> However, this does not work today in DataFusion:
> {code}
> > select database_name, storage, sum(estimated_bytes) from chunks group by 1, 
> > 2;
> Plan("Projection references non-aggregate values")
> {code}



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

Reply via email to