【发布时间】:2017-01-01 19:22:07
【问题描述】:
拥有这个实体
@Table(keyspace = KEYSPACE)
public class CE_TimeSeries extends Entity implements TimeSeriesPoint{
@PartitionKey(1)
private String typeId;
@ClusteringColumn(value=1, asc=true)
private String userId;
@ClusteringColumn(value=2, asc=true)
private Date startDate;
@Column
private Date endDate;
@Column
private int groupInterval;
@Column
private int interval;
}
这个 CQL
SELECT startDate, endDate, groupInterval, interval FROM CE_TimeSeries WHERE typeId
= :typeId and userId = :userId and ( endDate >= :fromDate or ( startDate >=
:fromDate and startDate <= :toDate ) )
给出例外:
Caused by: com.datastax.driver.core.exceptions.SyntaxError: line 1:142
mismatched input 'or' expecting ')' (... ( endDate >= :fromDate [or] (...)
【问题讨论】: