在业务上我们要做一个根据markId分组并且按照collect_time 拿到最后一条数据
cassandraTemplate 执行sql
select mark_id, collect_time from temp_his where mark_id in (1,2,3) group by mark_id order by collect_time desc
提示报错
Cannot page queries with both ORDER BY and a IN restriction on the partition key; you must either remove the ORDER BY or the IN and sort client side, or disable paging for this query; nested exception is com.datastax.driver.core.exceptions.InvalidQueryException: Cannot page queries with both ORDER BY and a IN restriction on the partition key; you must either remove the ORDER BY or the IN and sort client side, or disable paging for this query
提示不能同时使用in 和 order by