[MDEV-6157] Cassandra SE storage engine unable to map timestamp columns Created: 2014-04-23  Updated: 2014-04-29  Resolved: 2014-04-29

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.10
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Dmytro Andriychenko Assignee: Sergei Petrunia
Resolution: Won't Fix Votes: 0
Labels: cassandra
Environment:

Centos 6.5 64bit, DataStax Enterprise v4 (Cassandra v2.0)



 Description   

I am unable to map a timestamp column to a MariaDB Cassandra SE table.

I can get all other data types mapped except timestamp.

This is the error message I get:

SQL Error (1815): Internal error: Failed to map column some_datetime to datatype org.apache.cassandra.db.marshal.TimestampType

This is create statement in Cassandra:

create table test_key_space.test_timestamp
(
	id int PRIMARY KEY,
	some_datetime timestamp	
) WITH COMPACT STORAGE;

This is the create statement in MariaDB:

create table test.test_timestamp
(
	id int PRIMARY KEY,
	some_datetime timestamp
) engine=cassandra
  thrift_host= '10.0.95.68'
  keyspace= 'test_key_space'
  column_family='test_timestamp';

I understand this engine is not under active development, but I would very much appreciate if you could at least let me know if this is even supposed to work as suggested in the documentation on data type mapping:
https://mariadb.com/kb/en/cassandra-storage-engine/

Thank you very much in advance,

Dmytro



 Comments   
Comment by Elena Stepanova [ 2014-04-26 ]

It works with Cassandra 1.2.16, but not with 2.0.7.

From what I see, Cassandra 2.0 came with the new type for timestamp: TimestampType (as opposed to the old DateType).

Cassandra SE has a mapping to DateType, but not TimestampType.

Column families created with previous versions are still usable since they have DateType, but new ones are created with TimestampType and thus the error occurs.

Even if this particular problem gets fixed, I doubt that Cassandra SE will work well with Cassandra 2.0 even then. I will leave it to psergey to decide.

Comment by Dmytro Andriychenko [ 2014-04-28 ]

Many thanks for the explanation, Elena, this makes sense. I take it this is
not likely to be fixed in the nearest future?

Thank you,

Dmytro

On 26 April 2014 18:13, Elena Stepanova (JIRA)

Comment by Sergei Petrunia [ 2014-04-29 ]

Right, it is unlikely that this will be fixed anytime by MariaDB team.

However, if somebody submits a patch that fixes this (while not breaking C* 1.1 compatibility), it will most likely be accepted.

Comment by Sergei Petrunia [ 2014-04-29 ]

Closing as won't fix. Feel free to re-open if there are any new details.

Generated at Thu Feb 08 07:09:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.