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/11/29 19:36:23 UTC
[GitHub] [pinot] lakshmanan-v opened a new issue #7836: Support MIN/MAX transformation functions
lakshmanan-v opened a new issue #7836:
URL: https://github.com/apache/pinot/issues/7836
Currently MAX()/MIN() are supported in aggregate functions. But in non aggregate situations, we need to use complex Switch case statements to find MIN/MAX.
It would be great if we can support these functions in a recursive way as well.
Example:
**Current approach:**
```
SELECT
col1,
CASE
WHEN col2 < col4 and col2 < col5 THEN col2
CASE
WHEN col4 > col5 and col4 < col2 THEN col4
CASE
WHEN col5 > col4 THEN col5 < col2 THEN col5
END as final_value
FROM table;
```
**Proposed approach:**
```
SELECT
col1,
MIN(col2, MAX(col4, col5)) as final_value
FROM table;
```
--
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 #7836: Support MIN/MAX transformation functions
Posted by GitBox <gi...@apache.org>.
richardstartin commented on issue #7836:
URL: https://github.com/apache/pinot/issues/7836#issuecomment-981955434
I am interested in picking this up in early 2022 cc @mayankshriv @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
[GitHub] [pinot] Jackie-Jiang commented on issue #7836: Support MIN/MAX transformation functions
Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on issue #7836:
URL: https://github.com/apache/pinot/issues/7836#issuecomment-983123618
The functionality can be easily added by adding a transform function. The challenge here is to automatically consider the `min/max` as transform when it has more than 1 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