Table Schema:
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);
Select query with where clause:
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';
ERROR:
InvalidRequest: Error from server: code=2200 [Invalid query] message="PRIMARY KEY column "comdate" cannot be restricted as preceding column "comtype" is not restricted"
what is primary key column restricted as proceding column? if remove the comDate date in where clause ,i m able to retrive the data