Cassandra Error : expected 8 or 0 byte long for date

Viewed 2687

I am using spring data cassandra

My this code is working

@Query("SELECT count(*) as cnt FROM notifications where userid = ?0 and typeofnotification=?1  "
            + "and notificationId > minTimeuuid('2019-09-12') and category = ?3 allow filtering")

    public Integer findCountForCategoryForDate(int userId, String typeOfNotification, String category);

But when i am trying to give date as param, it is giving error

@Query("SELECT count(*) as cnt FROM notifications where userid = ?0 and typeofnotification=?1  "
            + "and notificationId > minTimeuuid(?2) and category = ?3 allow filtering")

public Integer findCountForCategoryForDate(int userId, String typeOfNotification,String date, String category);

What am i missing?

notificationId column is timeuuid in DB

2 Answers
Related