我正在使用带有CQL 3.0的Cassandra 1.1.0 .
创建表时,会发生以下错误 . 我提到http://www.datastax.com/dev/blog/cql3-evolutions
cqlsh:test> CREATE TABLE timeseries (
... event_type text,
... insertion_time timestamp,
... event blob,
... PRIMARY KEY (event_type, insertion_time)
... ) WITH CLUSTERING ORDER BY insertion_time DESC;
Bad Request: line 6:22 mismatched input 'ORDER' expecting '='
这是无效的查询吗?你有什么建议吗?
谢谢 .
2 回答
WITH CLUSTERING ORDER
语法仅在Cassandra 1.1.1中添加(几天前刚刚发布),因此它在1.1.0中不起作用 .但是,该示例缺少聚类定义周围的一些括号 . 你要:
希望有所帮助 . 我会让那篇文章的作者知道这个问题 .
是的,您可以在此链接中查看详细信息http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/create_table_r.html