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 2021/12/09 21:26:02 UTC

[GitHub] [pinot] TT1103 opened a new issue #7888: MAX function should not cast to double, but instead keep original type

TT1103 opened a new issue #7888:
URL: https://github.com/apache/pinot/issues/7888


   When selecting a max of a large long, it truncates the result and loses precision. 
   For example:
   `select MAX(1639054811930692679) from table` returns 1.63905481193069261E18, and loses precision. 
   
   Instead, the MAX function should return the original type. 


-- 
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] Jackie-Jiang commented on issue #7888: MAX function should not cast to double, but instead keep original type

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on issue #7888:
URL: https://github.com/apache/pinot/issues/7888#issuecomment-1015955768


   Currently aggregation function requires fixed return type. Without changing the query engine, one way to handle it is to add different version of `MAX` (e.g. `MAXLONG` and `MAXDOUBLE`), and broker can override the original `MAX` function based on the column schema


-- 
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] aditya-pt commented on issue #7888: MAX function should not cast to double, but instead keep original type

Posted by GitBox <gi...@apache.org>.
aditya-pt commented on issue #7888:
URL: https://github.com/apache/pinot/issues/7888#issuecomment-1015267722


   +1 
   min and max should follow the original type as there is no issue of overflows
   We can also have sum functions like **sumInt** and **sumLong** which may overflow but help preserve the original type


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