Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

pkoppishetty_116065 avatar image
pkoppishetty_116065 asked ·

Does Cassandra 3.11.1 support DateRangeType?

I am using

[cqlsh 5.0.1 | Cassandra 3.11.5 | CQL spec 3.4.4 | Native protocol v4]



cassandra@cqlsh:test> CREATE TABLE test.example (

... id int PRIMARY KEY,

... daterange 'DateRangeType'

... );

SyntaxException: Error setting type DateRangeType: Unable to find abstract-type class 'org.apache.cassandra.db.marshal.DateRangeType'



datatype
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

@pkoppishetty_116065 When defining the schema, you just need to use the date type. For details, see the list of valid CQL data types. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.