[
https://issues.apache.org/jira/browse/CASSANDRA-11873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15335787#comment-15335787
]
Sylvain Lebresne commented on CASSANDRA-11873:
----------------------------------------------
bq. Does it statisfies everybody?
Pretty much what I had in mind so mostly good with me with a few remarks:
bq. I guess:16 or 20 bytes with custom comparator unless we use some variable
length
That's certainly more of an implementation details, but probably worth getting
at least a tad fancy. It shouldn't be too rare to have duration below the day
for instance so maybe at least a format with some initial flags to say if we
have the month and day component at all would be nice. vints would be nice but
unless I'm brain-farting, it's not easily compatible with making the type
byte-comparable (unlike simple presence flags).
bq. Support for simple litterals with the following symbols
It shouldn't be harder (technically it likely can be reduced to a parser thing)
to also support the longer version (basically, {{y}}, {{year}} or {{years}},
etc...) and while I'm personally fine with the abbreviations, some people may
like the explicitness of the verbose version, so I'd fine supporting it.
bq. Additional support for ISO 8601 "format with designators" and ISO 8601
"alternative format"
I'm only mildly convinced it's useful cause the literal syntax is here mostly
for convenience in cqlsh and I can't see why you'd want those format over the
simpler ones above, but I guess I'm fine with it for the sake of consistency
with our support of ISO 8601 in dates. *But* I will note that those syntax are
currently valid identifiers so strictly speaking, this would be a breaking
change, which is an argument for not bothering. I can admit that having a
column named {{P1Y}} is weird in the first place, so I'm not going to agonize
over this if we insist on supporting it, but if we do it, we should at least
not forget to notify that clearly in the NEWS file.
> 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)