cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-11936) Add support for + and - operations on dates
Date Wed, 18 Jan 2017 09:29:26 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-11936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15827711#comment-15827711
] 

Benjamin Lerer commented on CASSANDRA-11936:
--------------------------------------------

While working on the ticket we realized a couple of problem linked to the description example.
If you do something like {{myTimeuuid - 2h}}, you will expect that operation to return a {{timeuuid}}.
The problem is that this type of operation does not really make sense for timeuuid.

The idea for {{date}} and {{timestamp}} is then to add some new methods: {{currentTimestamp}}
and {{currentDate}} to allow: {{WHERE reading_time < currentTimestamp() - 2h}} and {{WHERE
reading_time < currentDate() - 2d}} (CASSANDRA-13132)

For timeuuid you will have to do  {{WHERE reading_time < minTimeuuid(currentTimestamp()
- 2h)}}




> Add support for + and - operations on dates
> -------------------------------------------
>
>                 Key: CASSANDRA-11936
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11936
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: CQL
>            Reporter: Benjamin Lerer
>            Assignee: Benjamin Lerer
>             Fix For: 3.x
>
>
> For time series it can be interesting to allow queries with {{WHERE}} clause like: {{...
WHERE reading_time < now() - 2h}}
> In order to do that we need to add support for: {{+}} and {{-}} operation with date.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message