Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E8F9E200B8E for ; Mon, 26 Sep 2016 10:14:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E7D6D160AB8; Mon, 26 Sep 2016 08:14:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 39BBC160AE5 for ; Mon, 26 Sep 2016 10:14:24 +0200 (CEST) Received: (qmail 93235 invoked by uid 500); 26 Sep 2016 08:14:22 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 92825 invoked by uid 99); 26 Sep 2016 08:14:22 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Sep 2016 08:14:22 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7A56F2C2A6C for ; Mon, 26 Sep 2016 08:14:22 +0000 (UTC) Date: Mon, 26 Sep 2016 08:14:22 +0000 (UTC) From: "Benjamin Lerer (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-11873) Add duration type MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 26 Sep 2016 08:14:25 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-11873?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D15522414#comment-15522414 ]=20 Benjamin Lerer commented on CASSANDRA-11873: -------------------------------------------- |[trunk|https://github.com/blerer/cassandra/tree/11873-trunk]|[utests|http:= //cassci.datastax.com/view/Dev/view/blerer/job/blerer-11873-trunk-testall/7= /]|[dtests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-11873= -trunk-dtest/6/]| The patch add the DurationType. Internally, the data are stored as 3 vints:= one for the number of months, one for the number of days and one for the n= umber of nanoseconds. This will allow the type to work properly with daylig= ht saving if needed. The type is, as discussed previously, non comparable. Its main goal being t= o simplify CQL queries for time series data. The type support: * Simple litterals (e.g. {{2mo10d12h}}: 2 months 10 days and 12 hours) with= the following symbols (case insensitive): * {{y}}: years * {{mo}}: months * {{w}}: weeks * {{d}}: days * {{h}}: hours * {{m}}: minutes * {{s}}: seconds * {{ms}}: milliseconds * {{=C2=B5s}} or {{us}}: microseconds * {{ns}}: nanoseconds * ISO 8601 "format with designators": {{PnYnMnDTnHnMnS}} or {{PnW}} (e.g {= {P2M10DT12H}}: 2 months 10 days and 12 hours * ISO 8601 "alternative format": {{PYYYY-MM-DDThh:mm:ss}} (e.g {{P0000-02-= 10T12:00:00}}: 2 months 10 days and 12 hours =20 > Add duration type > ----------------- > > Key: CASSANDRA-11873 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1187= 3 > 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 microse= conds. -- This message was sent by Atlassian JIRA (v6.3.4#6332)