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-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org