[
https://issues.apache.org/jira/browse/CASSANDRA-11873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15332685#comment-15332685
]
Brian Hess commented on CASSANDRA-11873:
-----------------------------------------
So, one question about syntax. SQL has a time interval type with its own
syntax. Instead of inventing additional syntax, what about taking on the
Postgres or Oracle/SQL-Standard syntax.
For example, Postgres uses "1 day ago" or "-1 day" (or hour, minute, etc):
https://www.postgresql.org/docs/current/static/datatype-datetime.html
Oracle uses "INTERVAL '1' HOUR":
https://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements003.htm#i38598
I suggest we choose something similar to one that exists, rather than create
our own new syntax.
> 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)