[
https://issues.apache.org/jira/browse/CASSANDRA-11873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15546915#comment-15546915
]
Tyler Hobbs commented on CASSANDRA-11873:
-----------------------------------------
This looks pretty solid so far. I haven't completed my review, but these are
my initial comments:
* {{doc/source/cql/changes.rst}}: typo: "Adds a dew"
* {{doc/source/cql/types.rst}}:
** For clarity, we should define all units in terms of either months, days, or
nanoseconds. For example, a 'year' should be 12 months, an hour should be
described as 3600000000000 nanoseconds, etc.
** Typo in ".. \_durtaion-limitation:"
** I would rephrase "Duration cannot be used for columns part of the ``PRIMARY
KEY`` of a table." as "Duration columns cannot be used in a table's ``PRIMARY
KEY``."
Do we need to do something special to disallow durations in MV primary keys as
well? It seems like the call to {{AbstractType.checkComparable()}} in
{{CFMetadata.rebuild()}} may handle this, but I see that you also changed
{{CreateTableStatement}} to specifically handle the duration type, so we may
need to have a friendlier check for views as well. Perhaps this could utilize
{{AbstractType.checkComparable()}} to be more general. Also, we should make
sure secondary index or filtering queries with >, >=, <, <= operators error
correctly, too. In the past these might have been protected by a special check
against counters.
We will also need to add "duration" to the python driver's reserved keywords in
{{cassandra/metadata.py}}.
> 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)