cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From " Brian Hess (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-11873) Add duration type
Date Fri, 17 Jun 2016 12:59:05 GMT


 Brian Hess commented on CASSANDRA-11873:

That largely covers my thoughts, with a couple things:
1. Change "us" to "u" to be consistent with InfluxDB, and to keep the abbreviations consistently
to 1 letter.
2. Change the "ns" to "n" to keep all the abbreviations consistently to one letter. 
3. Change "y" to "Y" so year and month are both capital. I'm not sure exactly, but I would
be inclined to changing "d" to "D" and "w" to "W" so units smaller than a day are lower-case
and the others are upper-case, for user-friendliness. 

Two other suggestions/questions:
a) Is it possible to change Month or Minute to be something other than M/m so that we could
make these units case insensitive? I don't have a great suggestion there, but I have no good
suggestion there (maybe M for month and N for minute? Like I said, not great).
b) What CQL type has nanosecond resolution? Is there any way someone can do any arithmetic
on a CQL type where it would do anything with "4ns"? now() is a timestamp which has millisecond
resolution. So, I actually don't see the data type that has anything fine grained enough here.
If that's the case we can get rid of "ns". I'm not sure what had microsecond resolution either
now that I look at our docs, so perhaps the same for "u". 

> Add duration type
> -----------------
>                 Key: CASSANDRA-11873
>                 URL:
>             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

View raw message