You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/03/09 23:13:26 UTC

[GitHub] [druid] ccaominh commented on a change in pull request #9488: Match GREATEST/LEAST function behavior to other DBs

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

 ##########
 File path: docs/querying/sql.md
 ##########
 @@ -334,6 +332,22 @@ simplest way to write literal timestamps in other time zones is to use TIME_PARS
 |<code>timestamp_expr { + &#124; - } <interval_expr><code>|Add or subtract an amount of time from a timestamp. interval_expr can include interval literals like `INTERVAL '2' HOUR`, and may include interval arithmetic as well. This operator treats days as uniformly 86400 seconds long, and does not take into account daylight savings time. To account for daylight savings time, use TIME_SHIFT instead.|
 
 
+### 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.
 
 Review comment:
   The references that I looked at (added to the description) do implicit casting. The docs I added here are inspired by the ones for MySQL: https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#function_least

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org