[jira] [Commented] (CASSANDRA-7367) add cql function to create timeuuid from date

2014-06-11 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-7367:
-

My bad, I realize that the goal is inserts here. In that case, I'm not entirely 
fan of such functions because it makes it very easy to create 2 timeuuid that 
conflicts while the goal of timeuuid is to avoid that. It feels to me that 
creating a timeuuid from a date for something else than a query is 
intrinsically wrong, hence my reluctance to add a function to make it easy.

> add cql function to create timeuuid from date
> -
>
> Key: CASSANDRA-7367
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7367
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Dave Brosius
>Assignee: Dave Brosius
>Priority: Trivial
> Fix For: 3.0
>
> Attachments: 7367.txt
>
>
> creating timeuuids in cql is unwieldy. Adding a toTimeuuid() function to 
> convert a date/time to a time uuid.
> ie, 
> create table foo (key timeuuid primary key, value text);
> insert into foo (key, value) values (toTimeuuid('2009-12-16 19:26:29-0500'), 
> 'hello');



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7367) add cql function to create timeuuid from date

2014-06-11 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-7367:
-

How is that different from the existing {{minTimeuuid()}} and {{maxTimeuuid()}} 
functions (expect that it creates a clock and sequence number that are 
basically random which is likely a bad idea)?

> add cql function to create timeuuid from date
> -
>
> Key: CASSANDRA-7367
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7367
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Dave Brosius
>Assignee: Dave Brosius
>Priority: Trivial
> Fix For: 3.0
>
> Attachments: 7367.txt
>
>
> creating timeuuids in cql is unwieldy. Adding a toTimeuuid() function to 
> convert a date/time to a time uuid.
> ie, 
> create table foo (key timeuuid primary key, value text);
> insert into foo (key, value) values (toTimeuuid('2009-12-16 19:26:29-0500'), 
> 'hello');



--
This message was sent by Atlassian JIRA
(v6.2#6252)