alamb opened a new issue #110: URL: https://github.com/apache/arrow-datafusion/issues/110
*Note*: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-10374 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 is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org