【发布时间】:2023-03-16 07:09:01
【问题描述】:
表架构:
CREATE TABLE com (
receiverid text,
senderid text,
commatriid text,
comtype tinyint,
comid text,
displaystatus tinyint,
comdate timestamp,
cominfoid bigint,
comstatus tinyint,
dateactioned timestamp,
datedeleted timestamp,
dateread timestamp,
dateupdated timestamp,
disclosedmatriid tinyint,
filteredmsg tinyint,
message text,
recentstatus tinyint,
regionallang tinyint,
transmsg text,
PRIMARY KEY (receiverid, senderid, commatriid, comtype, comid, displaystatus, comdate)
) WITH CLUSTERING ORDER BY (senderid ASC, commatriid ASC, comtype ASC, comid ASC, displaystatus ASC, comdate ASC);
使用 where 子句选择查询:
SELECT ComInfoId,ComId,ComType,SenderId,ReceiverId,ComMatriId,ComDate,ComStatus FROM com WHERE ComMatriId='M1'AND SenderId='M79984222' and ReceiverId='M2' and ComDate <= '2017-11-14 09:20:05+0000';
错误:
InvalidRequest:来自服务器的错误:code=2200 [无效查询] message="PRIMARY KEY 列“comdate”不能被限制为 前列“comtype”不受限制”
什么是主键列限制为处理列? 如果删除 where 子句中的 comDate 日期,我可以检索数据
【问题讨论】:
标签: cassandra cassandra-3.0 spring-data-cassandra