You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/10/12 07:28:44 UTC

[GitHub] [pinot] vvivekiyer opened a new issue, #9574: Add support for SUM(DISTINCT colA) aka DISTINCTSUM

vvivekiyer opened a new issue, #9574:
URL: https://github.com/apache/pinot/issues/9574

   Currently, pinot only supports using `COUNT` aggregation function on `DISTINCT`. This is supported in two ways:
   1. DISTINCTCOUNT
   2. COUNT(DISTINCT colA) 
   
   https://github.com/apache/pinot/blob/e813867985746e916c8e898a530002551b661496/pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java#L788-L789
   
   
   The ask in this issue to make pinot also support `SUM` aggregation function on `DISTINCT`. As mentioned above, this can be supported using two ways:
   1. SUM(DISTINCT colA)   ---> SQL friendly way
   2. DINSTINCTSUM
   
   Similar support is offered by MySQL - https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_sum 
   


-- 
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: commits-unsubscribe@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] vvivekiyer commented on issue #9574: Add support for DISTINCTSUM and DISTINCTAVERAGE functions

Posted by GitBox <gi...@apache.org>.
vvivekiyer commented on issue #9574:
URL: https://github.com/apache/pinot/issues/9574#issuecomment-1379360127

   OSS issue for extending this support to MV columns https://github.com/apache/pinot/issues/10109


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] siddharthteotia commented on issue #9574: Add support for DISTINCTSUM and DISTINCTAVERAGE functions

Posted by GitBox <gi...@apache.org>.
siddharthteotia commented on issue #9574:
URL: https://github.com/apache/pinot/issues/9574#issuecomment-1379307659

   Support has been merged for `DISTINCTSUM` and `DISTINCTAVG` for SV columns. Support for MV columns will be done in a follow-up PR. 


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] siddharthteotia closed issue #9574: Add support for DISTINCTSUM and DISTINCTAVERAGE functions

Posted by GitBox <gi...@apache.org>.
siddharthteotia closed issue #9574: Add support for DISTINCTSUM and DISTINCTAVERAGE functions
URL: https://github.com/apache/pinot/issues/9574


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] siddharthteotia commented on issue #9574: Add support for SUM(DISTINCT colA) aka DISTINCTSUM

Posted by GitBox <gi...@apache.org>.
siddharthteotia commented on issue #9574:
URL: https://github.com/apache/pinot/issues/9574#issuecomment-1370269425

   @vvivekiyer is working on this. 
   
   


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] vvivekiyer commented on issue #9574: Add support for SUM(DISTINCT colA) aka DISTINCTSUM

Posted by GitBox <gi...@apache.org>.
vvivekiyer commented on issue #9574:
URL: https://github.com/apache/pinot/issues/9574#issuecomment-1275714345

   I'm currently working on this.


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] walterddr commented on issue #9574: Add support for SUM(DISTINCT colA) aka DISTINCTSUM

Posted by GitBox <gi...@apache.org>.
walterddr commented on issue #9574:
URL: https://github.com/apache/pinot/issues/9574#issuecomment-1276514373

   this is not something postgres supports (which is much closer following SQL standard) 
   - only `COUNT(DISTINCT( colA [, colB]*)`
   
   however given we already support DISTINCTCOUNT, it seems ok to support DISTINCTSUM as a dialect sugar to me


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] siddharthteotia commented on issue #9574: Add support for SUM(DISTINCT colA) aka DISTINCTSUM

Posted by GitBox <gi...@apache.org>.
siddharthteotia commented on issue #9574:
URL: https://github.com/apache/pinot/issues/9574#issuecomment-1276464854

   cc @walterddr @Jackie-Jiang 


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org