I\'m trying to query a Cassandra table using the IN clause and the @Query annotation from Spring Data. I have a table with a partition key of last_name and a clustering key
Update
With current spring, it seems to be working without braces.
Old answer
You have to use bracers when you are using IN.
@Query("SELECT * FROM people WHERE last_name=?0 AND first_name IN (?1)")
public List findByLastName(String lastName, String[] firstName);
But there are some other issues in your code. I changed them all to a good coding standards as below. Including my personal favorite of using named parameters.
@Query("SELECT p FROM People p WHERE p.lastName = :lastName AND p.firstName IN (:firstNames)")
public List findByName(@Param("lastName") String lastName, @Param("firstNames") String[] firstNames);