首页 文章

使用ORDER BY ASC和LIMIT时出现错误的Cassandra CQL查询

提问于
浏览
1

我创建了一个具有以下配置的Cassandra表:

CREATE TABLE "ABC" (
    subsector text,
    marketcapital decimal,
    id text,
    PRIMARY KEY (subsector, marketcapital, id)
) WITH CLUSTERING ORDER BY ( marketcapital DESC, id ASC )

在Datastax开发中心运行时出现错误的CQL查询:

select * from "ABC" where subsector='10010' and marketcapital > 50717820.457485 ORDER BY marketcapital ASC  LIMIT 3

在执行上面的查询时我得到以下错误:

enter image description here

使用LIMIT关键字,ORDER BY ASC似乎出错 .

1 回答

  • 0

    这似乎是Datastax开发中心的问题,因为当我使用cqlsh运行相同的查询时工作正常 .

    最可能的原因是Dev中心正在使用一些旧版本的CQL规范,因为发生了这个错误 .

相关问题