2

Using DataStax 4.8.11 with Cassandra 2.1.17, Ubuntu14.04 I am trying to create a table with time data type. The syntax works fine on Cassandra 2.2.8/Win7, but not on DataStax 4.8.11.

CREATE KEYSPACE tests WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor': 1};

CREATE TABLE testts (
            ID int PRIMARY KEY,
            mdate timestamp,            
            ttime time);

I get error :

Invalid request: code=2200 [Invalid Query] message=Unknown type tests.time]

Thanks

Martin Schröder
  • 4,176
  • 7
  • 47
  • 81
Sam-T
  • 1,877
  • 6
  • 23
  • 51

1 Answers1

2

The time data type was introduced in protocol version 4, which requires Cassandra 2.2+ (DataStax Enterprise 5.0+). Because of this, time cannot be used for a column in DataStax 4.8.x / Cassandra 2.1.

Andy Tolbert
  • 11,418
  • 1
  • 30
  • 45
  • Andy Thanks for clarifying this. I suspected/guessed something like this somehow the API docs didn't have the @since (maybe I missed it). I will try look for alternate solution. – Sam-T Nov 29 '16 at 18:39