You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Igor Rudyak <ir...@gmail.com> on 2017/03/31 04:05:11 UTC

Re: Timestamp is not stored correctly with Cassandra

Hello,

It works for long, but doesn't work for Timestamp cause there are no direct
mapping (
http://docs.datastax.com/en/developer/java-driver/3.1/manual/#cql-to-java-type-mapping
<http://docs.datastax.com/en/developer/java-driver/3.1/manual/#cql-to-java-type-mapping> 
) from java.sql.Timestamp to Cassandra's Timestamp type.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Timestamp-is-not-stored-correctly-with-Cassandra-tp11590p11595.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Timestamp is not stored correctly with Cassandra

Posted by Nikolai Tikhonov <nt...@apache.org>.
Hi Jenny,

Could you change type your field in POJO class to java.utile.Date? It's
solve your problem?

On Tue, Apr 4, 2017 at 7:12 PM, Nikolai Tikhonov <nt...@apache.org>
wrote:

> Hello,
>
> Jenny,
> I'm bit confused. Which type do you have in cassandra table? timestamp? As
> I see from http://docs.datastax.com/en/developer/java-driver/3.1/m
> anual/#cql-to-java-type-mapping timestamp should be converted to
> java.util.Date
>
> Igor,
> By the way, could we support to custom type converter in integration with
> cassandra?
>
> On Fri, Mar 31, 2017 at 7:05 AM, Igor Rudyak <ir...@gmail.com> wrote:
>
>> Hello,
>>
>> It works for long, but doesn't work for Timestamp cause there are no
>> direct
>> mapping (
>> http://docs.datastax.com/en/developer/java-driver/3.1/manual
>> /#cql-to-java-type-mapping
>> <http://docs.datastax.com/en/developer/java-driver/3.1/manua
>> l/#cql-to-java-type-mapping>
>> ) from java.sql.Timestamp to Cassandra's Timestamp type.
>>
>>
>>
>> --
>> View this message in context: http://apache-ignite-users.705
>> 18.x6.nabble.com/Timestamp-is-not-stored-correctly-with-Cass
>> andra-tp11590p11595.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>
>
>

Re: Timestamp is not stored correctly with Cassandra

Posted by Nikolai Tikhonov <nt...@apache.org>.
Hello,

Jenny,
I'm bit confused. Which type do you have in cassandra table? timestamp? As
I see from http://docs.datastax.com/en/developer/java-driver/3.1/
manual/#cql-to-java-type-mapping timestamp should be converted to
java.util.Date

Igor,
By the way, could we support to custom type converter in integration with
cassandra?

On Fri, Mar 31, 2017 at 7:05 AM, Igor Rudyak <ir...@gmail.com> wrote:

> Hello,
>
> It works for long, but doesn't work for Timestamp cause there are no direct
> mapping (
> http://docs.datastax.com/en/developer/java-driver/3.1/
> manual/#cql-to-java-type-mapping
> <http://docs.datastax.com/en/developer/java-driver/3.1/
> manual/#cql-to-java-type-mapping>
> ) from java.sql.Timestamp to Cassandra's Timestamp type.
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Timestamp-is-not-stored-correctly-with-
> Cassandra-tp11590p11595.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>