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-11873) Add duration type
Date Mon, 30 May 2016 08:44:12 GMT

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

Benjamin Lerer commented on CASSANDRA-11873:
--------------------------------------------

|[branch|https://github.com/apache/cassandra/compare/trunk...blerer:11873-trunk]|[utests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-11873-trunk-testall/3/]|[dtests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-11873-trunk-dtest/3/]|

The patch adds a new {{duration}} type which store the duration in {{nanoseconds}} as a signed
64bits integer. Due to that the duration has a minimum of  {{-2 ^63^ ns}} and a maximum of
{{2 ^63^ - 1 ns}} (roughly -292/292 years).

The patch allow durration to be specified as litterals. A duration litterals is integer followed
by a time symbol. The supported symbols are:
* {{d}}: days
* {{h}}: hours
* {{m}}: minutes
* {{s}}: seconds
* {{ms}}: milliseconds
* {{ยตs}}: microseconds
* {{ns}}: nanoseconds

The duration can also be specified as a simple integer. In this case the duration unit used
is {{nanoseconds}}.

As the python driver does not support yet the {{duration}} type. The patch modify the CQLSH
scripts to allow it to work with duration columns.

> Add duration type
> -----------------
>
>                 Key: CASSANDRA-11873
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11873
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL
>            Reporter: Benjamin Lerer
>            Assignee: Benjamin Lerer
>             Fix For: 3.x
>
>
> For CASSANDRA-11871 or to allow queries with {{WHERE}} clause like:
> {{... WHERE reading_time < now() - 2h}}, we need to support some duration type.
> In my opinion, it should be represented internally as a number of microseconds.



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

Mime
View raw message