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/01/28 09:32:21 UTC

[GitHub] [pinot] richardstartin opened a new issue #8085: Add `least` and `greatest` functions

richardstartin opened a new issue #8085:
URL: https://github.com/apache/pinot/issues/8085


   `least(1,2,3,4,5);` yields 1
   `greatest(1,2,3,4,5);` yields 5
   
   
   |  foo | bar |
   | ---- | --- |
   | 1     |  0   |
   | 2     |  1   |
   | 5     |  4   |
   | 6     |  7   |
   
   `least(foo,bar,3) as min_ceiling;` yields 
   
   | min_ceiling |
   | ----------- |
   |   0               |
   |   1               |
   |   3              |
   |   3              |
   
   `greatest(foo,bar,3) as max_floor;` yields 
   
   | max_floor |
   | ---------- |
   |   3             |
   |   3              |
   |   5             |
   |   7             |


-- 
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] richardstartin commented on issue #8085: Add `least` and `greatest` functions

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


   I would prefer to implement this as a transform function so we can operate on arbitrary tuples. I already experimented with adding `least` and `greatest` to `ArithmeticFunctions` and the results were unsatisfactory (strictly binary, does not hand null well).


-- 
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 #8085: Add `least` and `greatest` functions

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


   We might want both because transform function cannot be applied to ingestion transforms and post-aggregation transforms. Performance wise, transform function version is definitely better. 


-- 
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 #8085: Add `least` and `greatest` functions

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


   We should replace the scalar function `min` with `least` and `max` with `greatest` (in `ArithmeticFunctions.java`). Currently we don't support arbitrary number of arguments in scalar function, but we can add different versions (e.g. 2 arguments, 3 arguments etc.). If user has more arguments, they can use nested `least` and `greatest`.
   We can also add transform function for them, which can take arbitrary number of arguments.


-- 
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] richardstartin closed issue #8085: Add `least` and `greatest` functions

Posted by GitBox <gi...@apache.org>.
richardstartin closed issue #8085:
URL: https://github.com/apache/pinot/issues/8085


   


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