Phoenix500526 commented on issue #5672:
URL: https://github.com/apache/datafusion/issues/5672#issuecomment-6675769634

   This appears to be fixed on `main` by #21058, merged as 
4aed81afcb8b34012f720daffe85aad680520e23. That PR preserves duplicate grouping 
sets and adds regression coverage, but it linked #21316 rather than this issue.
   
   I checked this reduced version of the reported query with a local 
`v57.0.0-dev` CLI:
   
   ```sql
   SELECT category, AVG(value) AS avg_value
   FROM (VALUES ('a', 10), ('b', 20)) AS t(category, value)
   GROUP BY GROUPING SETS ((category), (category), ())
   ORDER BY category NULLS LAST;
   ```
   
   It correctly returns five rows, preserving both occurrences of each category:
   
   ```text
   category | avg_value
   a        | 10.0
   a        | 10.0
   b        | 20.0
   b        | 20.0
   NULL     | 15.0
   ```
   
   Could we close this issue as resolved?
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to