Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1F69317328 for ; Thu, 23 Apr 2015 17:51:42 +0000 (UTC) Received: (qmail 16318 invoked by uid 500); 23 Apr 2015 17:51:42 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 16289 invoked by uid 500); 23 Apr 2015 17:51:41 -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 16278 invoked by uid 99); 23 Apr 2015 17:51:41 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2015 17:51:41 +0000 Date: Thu, 23 Apr 2015 17:51:41 +0000 (UTC) From: =?utf-8?Q?Micha=C3=ABl_Figui=C3=A8re_=28JIRA=29?= To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CASSANDRA-9229) Add functions to convert timeuuid to date or time MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Micha=C3=ABl Figui=C3=A8re created CASSANDRA-9229: ------------------------------------------- Summary: Add functions to convert timeuuid to date or time Key: CASSANDRA-9229 URL: https://issues.apache.org/jira/browse/CASSANDRA-9229 Project: Cassandra Issue Type: New Feature Reporter: Micha=C3=ABl Figui=C3=A8re As CASSANDRA-7523 brings the {{date}} and {{time}} native types to Cassandr= a, it would be useful to add builtin function to convert {{timeuuid}} to th= ese two new types, just like {{dateOf()}} is doing for timestamps. {{timeOf()}} would extract the time component from a {{timeuuid}}. Example = use case could be at insert time with for instance {{timeOf(now())}}, as we= ll as at read time to compare the time component of a {{timeuuid}} column i= n a {{WHERE}} clause. The use cases would be similar for {{date}} but the solution is slightly le= ss obvious, as in a perfect world we would want {{dateOf()}} to convert to = {{date}} and {{timestampOf()}} for {{timestamp}}, unfortunately {{dateOf()}= } already exist and convert to a {{timestamp}}, not a {{date}}. Making this= change would break many existing CQL queries which is not acceptable. Ther= efore we could use a different name formatting logic such as {{toDate}} or = {{dateFrom}}. We could then also consider using this new name convention fo= r the 3 dates related types and just have {{dateOf}} becoming a deprecated = alias. -- This message was sent by Atlassian JIRA (v6.3.4#6332)