[ 
https://issues.apache.org/jira/browse/CASSANDRA-11873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15330135#comment-15330135
 ] 

Alex P commented on CASSANDRA-11873:
------------------------------------

I was thinking that from a parameterization and composability pov having 
functions for these operations would be _simpler_ (_nb: I do see though how the 
string-only version looks friendlier). 

For example: with a {{DATE_ADD(date, int, timeunit)}} one could do {{WHERE t >= 
DATE_ADD(?, ?, ?}}. And composing {{WHERE T >= DATE_ADD(DATE_ADD(NOW(), -1, 
DAY), DATE_DIFF(date1, date2, DAY), DAY)}}. The latter could probably still be 
possible but it might involve more complicated expression parser and I'm not 
very sure how parameterizable it would be.

> 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)

Reply via email to