comphead commented on issue #5276:
URL: 
https://github.com/apache/arrow-datafusion/issues/5276#issuecomment-1433650162

   I'll file a ticket if that possible to squeeze something from current 
distinct computation
   ```
   ❯ SELECT "RegionID", SUM("AdvEngineID"), COUNT(*) AS c, 
AVG("ResolutionWidth"), COUNT(DISTINCT "UserID") FROM hits GROUP BY "RegionID" 
ORDER BY c DESC LIMIT 10;
   
+----------+-----------------------+----------+---------------------------+-----------------------------+
   | RegionID | SUM(hits.AdvEngineID) | c        | AVG(hits.ResolutionWidth) | 
COUNT(DISTINCT hits.UserID) |
   
+----------+-----------------------+----------+---------------------------+-----------------------------+
   | 229      | 2077656               | 18295832 | 1506.085243130785         | 
2845673                     |
   | 2        | 441662                | 6687587  | 1479.8386542111527        | 
1081016                     |
   | 208      | 285925                | 4261812  | 1285.2593246722286        | 
831676                      |
   | 169      | 100887                | 3320229  | 1465.9073732564832        | 
604583                      |
   | 32       | 81498                 | 1843518  | 1538.0376568061718        | 
216010                      |
   | 34       | 161779                | 1792369  | 1548.360152401654         | 
299479                      |
   | 184      | 55526                 | 1755192  | 1506.8082967561384        | 
322661                      |
   | 42       | 108820                | 1542717  | 1587.1085208758313        | 
243181                      |
   | 107      | 120470                | 1516690  | 1548.6028970982863        | 
272448                      |
   | 51       | 98212                 | 1435578  | 1579.8860354505293        | 
211505                      |
   
+----------+-----------------------+----------+---------------------------+-----------------------------+
   10 rows in set. Query took 559.109 seconds.
   ❯ SELECT "RegionID", SUM("AdvEngineID"), COUNT(*) AS c, 
AVG("ResolutionWidth") FROM hits GROUP BY "RegionID" ORDER BY c DESC LIMIT 10;
   +----------+-----------------------+----------+---------------------------+
   | RegionID | SUM(hits.AdvEngineID) | c        | AVG(hits.ResolutionWidth) |
   +----------+-----------------------+----------+---------------------------+
   | 229      | 2077656               | 18295832 | 1506.085243130785         |
   | 2        | 441662                | 6687587  | 1479.8386542111527        |
   | 208      | 285925                | 4261812  | 1285.2593246722286        |
   | 169      | 100887                | 3320229  | 1465.9073732564832        |
   | 32       | 81498                 | 1843518  | 1538.0376568061718        |
   | 34       | 161779                | 1792369  | 1548.360152401654         |
   | 184      | 55526                 | 1755192  | 1506.8082967561384        |
   | 42       | 108820                | 1542717  | 1587.1085208758313        |
   | 107      | 120470                | 1516690  | 1548.6028970982863        |
   | 51       | 98212                 | 1435578  | 1579.8860354505293        |
   +----------+-----------------------+----------+---------------------------+
   10 rows in set. Query took 32.514 seconds.
   ```


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

Reply via email to