cassandraTemplate 执行sql语句不能同时使用in 和 order by

在业务上我们要做一个根据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

无法对分区键同时使用ORDER BY和IN限制进行分页查询;您必须删除ORDER BY或IN并对客户端进行排序,或禁用此查询的分页;嵌套异常是com.datastax.driver.core.exceptions.InvalidQueryException:不能在分区键上同时使用ORDER BY和IN限制分页查询;您必须删除ORDER BY或IN并对客户端进行排序,或者禁用此查询的分页
in 和 order by一起使用是肯定没问题的,只是你使用过程中违背了规则。

使用in的话,里面应该是逗号隔开的字符或者数字吧