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

Carl Yeksigian commented on CASSANDRA-10784:
--------------------------------------------

I'm -1 on including a type like this.

There is no way to just compare by the UTC time in a partition key; we use the 
bytes of the full value, so it wouldn't resolve correctly. Because we can't 
drop the zone from the partition key, a query would also require the time zone 
to be incorporated, and we the two values wouldn't be on the same node, so they 
would both exist. This behavior would preclude ZonedDateTime from being 
included in Cassandra.

There are other ways to get the desired behavior. The best would be to split 
the zone out into a new column; it would need to be a static column for the 
primary key, and a regular column for the clustering key. A UDT would get you 
the same behavior as is described in the previous paragraph. And if you wanted 
to add a new data type for use with clustering columns, you can implement the 
{{AbstractType}} and deploy it in a jar alongside your Cassandra.

> ZonedDateTime as new CQL data type
> ----------------------------------
>
>                 Key: CASSANDRA-10784
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10784
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: CQL, Documentation and Website
>            Reporter: ZhaoYang
>            Assignee: ZhaoYang
>             Fix For: 3.x
>
>
> For globalization, ZonedDateTime is very important. Timestamp is not enough 
> and Zone info should be included. So Cassandra should support ZonedDateTime 
> as native data type and ordering using ZonedDateTime's utc value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to