[
https://issues.apache.org/jira/browse/CASSANDRA-11873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15335673#comment-15335673
]
Benjamin Lerer commented on CASSANDRA-11873:
--------------------------------------------
My proposal is the following:
* Support for: year, month, week, day, hour, minute, second, millisecond,
microsecond and nanosecond (as {{Time}} support nanosecond precision) by
encoding separatly months, days and nanoseconds (I guess:16 bytes with custom
comparator).
* Support for simple litterals with the following symbols:
** {{y}}: years
** {{M}}: months
** {{w}}: weeks
** {{d}}: days
** {{h}}: hours
** {{m}}: minutes
** {{s}}: seconds
** {{ms}}: milliseconds
** {{µs}} or {{us}}: microseconds
** {{ns}}: nanoseconds
* Additional support for ISO 8601 "format with designators" and ISO 8601
"alternative format"
So the following litterals will be supported:
|1y2M3d4h5m6s| CQL format for: 1 year 2 months 3 days 4 hours 5 minutes 6
seconds|
|P1Y2M3DT4H5M6S| ISO 8601 "format with designators"|
|P0001-02-03T04:05:06| ISO 8601 "alternative format"|
Does it statisfies everybody?
> 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
> Labels: client-impacting, doc-impacting
> 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)