You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2017/06/06 19:36:28 UTC
calcite git commit: [CALCITE-1827] Document TIMESTAMPADD and
TIMESTAMPDIFF functions (SunJincheng)
Repository: calcite
Updated Branches:
refs/heads/master 419b810fe -> f5df5dd8c
[CALCITE-1827] Document TIMESTAMPADD and TIMESTAMPDIFF functions (SunJincheng)
Close apache/calcite#466
Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/f5df5dd8
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/f5df5dd8
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/f5df5dd8
Branch: refs/heads/master
Commit: f5df5dd8cc1c97076fd6a0afc0fddc731b26b34c
Parents: 419b810
Author: sunjincheng121 <su...@gmail.com>
Authored: Sat Jun 3 13:44:39 2017 +0800
Committer: Julian Hyde <jh...@apache.org>
Committed: Tue Jun 6 12:33:14 2017 -0700
----------------------------------------------------------------------
site/_docs/reference.md | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/calcite/blob/f5df5dd8/site/_docs/reference.md
----------------------------------------------------------------------
diff --git a/site/_docs/reference.md b/site/_docs/reference.md
index ab6ec62..6553cc4 100644
--- a/site/_docs/reference.md
+++ b/site/_docs/reference.md
@@ -1144,6 +1144,8 @@ Not implemented:
| HOUR(date) | Equivalent to `EXTRACT(HOUR FROM date)`. Returns an integer between 0 and 23.
| MINUTE(date) | Equivalent to `EXTRACT(MINUTE FROM date)`. Returns an integer between 0 and 59.
| SECOND(date) | Equivalent to `EXTRACT(SECOND FROM date)`. Returns an integer between 0 and 59.
+| TIMESTAMPADD(timeUnit, integer, datetime) | Returns *datetime* with an interval of (signed) *integer* *timeUnit*s added. Equivalent to `datetime + INTERVAL 'integer' timeUnit`
+| TIMESTAMPDIFF(timeUnit, datetime, datetime2) | Returns the (signed) number of *timeUnit* intervals between *datetime* and *datetime2*. Equivalent to `(datetime2 - datetime) timeUnit`
Calls to niladic functions such as `CURRENT_DATE` do not accept parentheses in
standard SQL. Calls with parentheses, such as `CURRENT_DATE()` are accepted in certain
@@ -1151,18 +1153,13 @@ standard SQL. Calls with parentheses, such as `CURRENT_DATE()` are accepted in c
Not implemented:
-* EXTRACT(timeUnit FROM interval)
* CEIL(interval)
* FLOOR(interval)
-* datetime - datetime timeUnit [ TO timeUnit ]
-* interval OVERLAPS interval
* \+ interval
* \- interval
* interval + interval
* interval - interval
* interval / interval
-* datetime + interval
-* datetime - interval
### System functions