sthetland commented on a change in pull request #9488: Match GREATEST/LEAST
function behavior to other DBs
URL: https://github.com/apache/druid/pull/9488#discussion_r390011330
##########
File path: docs/misc/math-expr.md
##########
@@ -181,6 +181,22 @@ See javadoc of java.lang.Math for detailed explanation
for each function.
| all(lambda,arr) | returns 1 if all elements in the array matches the lambda
expression, else 0 |
+### Reduction functions
+
+Reduction functions operate on zero or more expressions and return a single
expression. If no expressions are passed
+as arguments, then the result is `NULL`. The expressions must all be
convertible to a
+common data type, which will be the type of the result:
+* If any argument is `NULL`, the result is `NULL`.
+* If the arguments comprise a mix of numbers and strings, the arguments are
interpreted as strings.
+* If all arguments are integer numbers, the arguments are interpreted as
longs.
+* If all arguments are numbers and at least one argument is a double, the
arguments are interpreted as doubles.
+
+| function | description |
+| --- | --- |
+| greatest([expr1, ...]) | Returns the maximum expression across zero or more
expressions. |
Review comment:
Old text, but maximum/minimum seem like not quite the right word.
```suggestion
| greatest([expr1, ...]) | Returns the largest value among zero or more
expressions. |
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]